compile 'com.amazonaws:aws-lambda-java-log4j:1.0.0'
and How to set your log4j2 file to support the lambda appender.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Configuration status="INFO" packages="com.amazonaws.services.lambda.runtime.log4j"> | |
<Appenders> | |
<Console name="Console" target="SYSTEM_OUT"> | |
<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %C - %msg%n"/> | |
</Console> | |
<LambdaAppender name="LambdaAppender"> | |
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %X{AWSRequestId} %-5p %c{1}:%L - %m%n"/> | |
</LambdaAppender> | |
</Appenders> | |
<Loggers> | |
<Root level="INFO"> | |
<AppenderRef ref="Console" /> | |
</Root> | |
<Logger name="com.dronze.aws.lambda" level="debug" additivity="false"> | |
<AppenderRef ref="LambdaAppender" /> | |
</Logger> | |
</Loggers> | |
</Configuration> |
No comments:
Post a Comment