Skip to content

Commit

Permalink
fix: log4j
Browse files Browse the repository at this point in the history
  • Loading branch information
leejiwon1125 committed Nov 30, 2023
1 parent e2cfd58 commit 6f86465
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@
status = warn

# Name of the configuration
name = ConsoleLogConfigDemo
name = ConsoleFileLogConfigDemo

# 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 %c{1}:%L - %m%n

# File appender configuration
appender.file.type = File
appender.file.name = fileLogger
appender.file.fileName = logs/app.log
appender.file.layout.type = PatternLayout
appender.file.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n

# Root logger level
rootLogger.level = info

# Root logger referring to console appender
# Root logger referring to both console and file appenders
rootLogger.appenderRef.stdout.ref = consoleLogger
rootLogger.appenderRef.file.ref = fileLogger

0 comments on commit 6f86465

Please sign in to comment.