Hi, I have an issue making logging with Log4j 2 work. I followed the instructions "Using log4j2 with AWS Lambda" from here: https://github.com/aws/aws-lambda-java-libs/tree/master/aws-lambda-java-log4j2
But all I can see in CloudWatch is this:
12:00:39 log4j:WARN No appenders could be found for logger (org.phileas.alexa.helloworld.HelloWorldSpeechletRequestStreamHandler). 12:00:39 log4j:WARN Please initialize the log4j system properly. 12:00:39 log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. 12:00:39 START RequestId: db6ad1ac-0422-11e8-a990-d1331b4d4cc4 Version: $LATEST 12:00:48 END RequestId: db6ad1ac-0422-11e8-a990-d1331b4d4cc4 12:00:48 REPORT RequestId: db6ad1ac-0422-11e8-a990-d1331b4d4cc4 Duration: 8860.30 ms Billed Duration: 8900 ms Memory Size: 128 MB Max Memory Used: 43 MB
The log4j2.xml file is at the place where it should be: <project-dir>/src/main/resources/log4j2.xml
And I simply create a Logger instance as explained: LogManager.getLogger(HelloWorldSpeechlet.class);
What's strange is that in the warning message it refers to the old log4j 1.2 in the URL: http://logging.apache.org/log4j/1.2/faq.html#noconfig
Any idea what's going wrong here?