Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable DynamoDB Local Logging?

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

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

like image 229
b-s-d Avatar asked Apr 08 '15 21:04

b-s-d


People also ask

What is logging and monitoring in DynamoDB?

Logging and Monitoring in DynamoDB. Monitoring is an important part of maintaining the reliability, availability, and performance of DynamoDB and your AWS solutions. You should collect monitoring data from all parts of your AWS solution so that you can more easily debug a multi-point failure, if one occurs.

How do I run DynamoDB on localhost?

To access DynamoDB running locally with the AWS CLI (Command Line Interface), use the –endpoint-url parameter. For example, use the following command to list DynamoDB tables. aws dynamodb list-tables --endpoint-url http://localhost:8000 Now your local installation is all set and you can start building your application.

How do I access DynamoDB in AWS?

Accessing DynamoDB. You can access Amazon DynamoDB using the AWS Management Console, the AWS Command Line Interface (AWS CLI), or the DynamoDB API.

How do I run a Java process in DynamoDB?

Under the hood, it will simply spin a Java process with a copy of Java-based local DynamoDB. All you need to do, is to tell the DynamoDB or DocumentClient to use the local endpoint in the constructor. func main() { sess, err := session.NewSession(& aws.


1 Answers

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

    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

  3. 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

  4. Add the new properties file to the jar

    zip -u DynamoDBLocal.jar log4j.properties

Source: https://gist.github.com/mdaley/aaf9b62d90f6817eb72a

like image 145
b-s-d Avatar answered Oct 16 '22 06:10

b-s-d