如何启用 DynamoDB 本地日志记录? [英] How do I enable DynamoDB Local Logging?

查看:16
本文介绍了如何启用 DynamoDB 本地日志记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DynamoDB Local 通常不显示描述性错误消息,为了查看您需要启用日志记录的内部错误.

More than often DynamoDB Local does not show descriptive error messages, in order to see internal errors you need to enable logging.

在标准输出上启用 DynamoDB Local 日志记录的步骤是什么?

What are the steps to enable DynamoDB Local logging on the standard output?

推荐答案

  1. 使用 DynamoDBLocal.jar 切换到目录
  2. 创建一个名为 log4j.properties 的新文件,内容如下:

  1. Change to the directory with DynamoDBLocal.jar
  2. Create a new file called log4j.properties with the contents:

log4j.rootLogger=调试,标准输出

log4j.rootLogger=DEBUG, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.layout=org.apache.log4j.PatternLayoutlog4j.appender.stdout.layout.ConversionPattern=LOG%d %p [%c] - %m%n

log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=LOG%d %p [%c] - %m%n

从 jar 中删除现有的 log4j.properties 文件(可能有两个)

Remove the existing log4j.properties files from the jar (there might be two)

zip -d DynamoDBLocal.jar log4j.properties

zip -d DynamoDBLocal.jar log4j.properties

zip -d DynamoDBLocal.jar log4j.properties

zip -d DynamoDBLocal.jar log4j.properties

将新的属性文件添加到 jar 中

Add the new properties file to the jar

zip -u DynamoDBLocal.jar log4j.properties

zip -u DynamoDBLocal.jar log4j.properties

来源:https://gist.github.com/mdaley/aaf9b62d90f6817eb72a

这篇关于如何启用 DynamoDB 本地日志记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆