Author Message
DonnaBybee
Joined: Jun 12, 2015
Messages: 1
Offline
Is there a way to differ the logging settings (ddlog4j and ddrt.properties) for different environments?

Is it possible to have multiple ddlog4j files and have the JVM parameters indicate which to use based on the environment?

For example:
ddlog4j-test.properties
ddrt-test.properties

ddlog4j-production.properties
ddrt-prod.properties
massimo__croci
Joined: Jan 31, 2020
Messages: 518
Offline
Hi. Never tried (so not so sure) anyway I'd say 'NO'.
You cannot rename the file ( because the runtime uses that file when it sets up the loggers).
Googling a bit, it seems, in case of multiple "log4j.properties" files, only the first one is loaded (https://stackoverflow.com/questions/10890505/multiple-log4j-properties-files-in-classpath).
You can add new appenders (ex. to have separate report files), if interested here the procedure: https://www.devconnectprogram.com/forums/posts/list/10298.page.


Go to:   
Mobile view