Skip to content

Play 1.7.1 - logging to application.log not working? #1489

Answered by pomegrn8
pomegrn8 asked this question in Q&A
Discussion options

You must be logged in to vote

Welp, I suppose I just had to reach out for help before I figured it out. For anyone else, here is what I did:
add log4j2.xml to application/conf with the following (open to suggestion if this can be improved...):

<?xml version="1.0" encoding="UTF-8"?> <Configuration status="INFO"> <Appenders> <RollingFile name="fileLogger" fileName="./application.log" filePattern="./app-%d{yyyy-MM-dd}.log"> <PatternLayout> <pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n </pattern> </PatternLayout> <Policies> <TimeBasedTriggeringPolicy interval="1" modulate="true" /> <SizeBasedTriggeringPolicy size="10MB" /> </Policies> </RollingFile> </Appenders> <Loggers> <Root level="error"> <append…

Replies: 0 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by pomegrn8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant