[JIRA] Commented: (LBCLASSIC-42) Multiple applications sharing the same config file

[ http://jira.qos.ch/browse/LBCLASSIC-42?page=com.atlassian.jira.plugin.system... ] Maarten Bosteels commented on LBCLASSIC-42: ------------------------------------------- yes it works. public void initLogging() throws JoranException { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); context.putProperty("appname", getApplicationName()); JoranConfigurator jc = new JoranConfigurator(); jc.setContext(context); context.shutdownAndReset(); jc.doConfigure("./src/main/resources/logback-settings.xml"); } <appender name="FILE" class="ch.qos.logback.core.FileAppender"> <file>/var/log/${appname}.log</file> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern> </layout> </appender>
Multiple applications sharing the same config file --------------------------------------------------
Key: LBCLASSIC-42 URL: http://jira.qos.ch/browse/LBCLASSIC-42 Project: logback-classic Issue Type: Improvement Components: Other Affects Versions: unspecified Environment: Operating System: Windows Platform: PC URL: http://marc.info/?t=120308330000003&r=1&w=2 Reporter: Ceki Gulcu Assignee: Ceki Gulcu Priority: Minor
The idea is to have a number of applications (over 20) to share the same config file so that the log output goes to different files.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (1)
-
Maarten Bosteels (JIRA)