1

May I know how to turn off DEBUG logging for AWS Lambda Function? My lambda function is a small spring boot application. Currently, it is generating a lot of debug log messages, particularly, "DEBUG org.apache.http.wire". Can I turn this off? May I know how?

Thanks, Ramesh.

parusha
  • 53
  • 4
  • Do you mean CloudWatch logs ? – Ersoy Apr 26 '20 at 19:50
  • 1
    I want to have the cloudwatch logs. But I dont want to see DEBUG messages. – parusha Apr 26 '20 at 19:56
  • Then you need to disable them from your application - aws lambda has nothing to do with that. – Ersoy Apr 26 '20 at 19:59
  • 2
    Thanks for your reply. I have the following entries in my log4j2.properties file log=. log4j.rootLogger =ERROR,LAMBDA # Define the LAMBDA appender log4j.logger.org.apache.http=ERROR log4j.logger.org.apache.http.wire=ERROR log4j.appender.LAMBDA=com.amazonaws.services.lambda.runtime.log4j.LambdaAppender log4j.appender.LAMBDA.layout=org.apache.log4j.PatternLayout log4j.appender.LAMBDA.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss} <%X{AWSRequestId}> %-5p %c{1}:%m%n – parusha Apr 26 '20 at 20:02
  • Please check https://stackoverflow.com/questions/46080448/logging-in-aws-lambda-with-slf4j - it may give a you a solution - i am not familiar with debugging logs. – Ersoy Apr 26 '20 at 20:06
  • Thank you very much. – parusha Apr 26 '20 at 20:10

0 Answers0