Skip to content

Commit

Permalink
Use a better default logging conf for examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper committed Oct 30, 2023
1 parent c79273f commit 2df218e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
24 changes: 17 additions & 7 deletions examples/http/src/main/resources/log4j2.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
rootLogger.level = TRACE
rootLogger.appenderRef.testlogger.ref = TestLogger
# Set to debug or trace if log4j initialization is failing
status = warn

appender.testlogger.name = TestLogger
appender.testlogger.type = CONSOLE
appender.testlogger.target = SYSTEM_ERR
appender.testlogger.layout.type = PatternLayout
appender.testlogger.layout.pattern = %-4r %-5p [$${ctx:restateServiceMethod}][$${ctx:restateInvocationId}] [%t] %c - %m%n
# Console appender configuration
appender.console.type = Console
appender.console.name = consoleLogger
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %notEmpty{[%X{restateServiceMethod}]}%notEmpty{[%X{restateInvocationId}]} %c - %m%n

# Restate logs to debug level
logger.app.name = dev.restate
logger.app.level = debug
logger.app.additivity = false
logger.app.appenderRef.console.ref = consoleLogger

# Root logger
rootLogger.level = info
rootLogger.appenderRef.stdout.ref = consoleLogger
24 changes: 17 additions & 7 deletions examples/lambda/src/main/resources/log4j2.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
rootLogger.level = TRACE
rootLogger.appenderRef.testlogger.ref = TestLogger
# Set to debug or trace if log4j initialization is failing
status = warn

appender.testlogger.name = TestLogger
appender.testlogger.type = CONSOLE
appender.testlogger.target = SYSTEM_ERR
appender.testlogger.layout.type = PatternLayout
appender.testlogger.layout.pattern = %-4r [%t] %-5p %c %x - %m%n
# Console appender configuration
appender.console.type = Console
appender.console.name = consoleLogger
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %notEmpty{[%X{restateServiceMethod}]}%notEmpty{[%X{restateInvocationId}]} %c - %m%n

# Restate logs to debug level
logger.app.name = dev.restate
logger.app.level = debug
logger.app.additivity = false
logger.app.appenderRef.console.ref = consoleLogger

# Root logger
rootLogger.level = info
rootLogger.appenderRef.stdout.ref = consoleLogger

0 comments on commit 2df218e

Please sign in to comment.