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

查看:204
本文介绍了如何启用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 = DEBUG, stdout

log4j.rootLogger=DEBUG, stdout

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

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 DynamoDBL ocal.jar log4j.properties

zip -u DynamoDBLocal.jar log4j.properties

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

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

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