[logback-dev] [JIRA] Updates for LOGBACK-1519: Logback config not honoring system property for log level
QOS.CH (JIRA)
noreply-jira at qos.ch
Sat Jul 18 19:15:00 CEST 2020
logback / LOGBACK-1519 [Open]
Logback config not honoring system property for log level
==============================
Here's what changed in this issue in the last few minutes.
This issue has been created
This issue is now assigned to you.
View or comment on issue using this link
https://jira.qos.ch/browse/LOGBACK-1519
==============================
Issue created
------------------------------
Phil Adams created this issue on 18/Jul/20 7:01 PM
Summary: Logback config not honoring system property for log level
Issue Type: Bug
Affects Versions: 1.2.3
Assignee: Logback dev list
Attachments: logback.xml
Components: logback-classic
Created: 18/Jul/20 7:01 PM
Environment: Linux Fedora 32, java 8, command-line app with loggers displaying on console
Priority: Major
Reporter: Phil Adams
Description:
{{I have a java application that is run from the command line. I have my logback.xml file configured to display all messages on the console.}}
{{In my logback.xml file, I have configured my logger like this:}}
{quote}
{{ <logger name="com.ibm.sdk.codegen" level="${SDKGEN_LOGLEVEL:-INFO}">}}
{{ <appender-ref ref="STDOUT"/>}}
{{ <appender-ref ref="STDERR"/>}}
{{ </logger>}}
{quote}
I want the default log level to be INFO, but I also would like to allow users to specify "-DSDKGEN_LOGLEVEL=DEBUG" as part of the java command to enable debug logging.
{{I'm following [these instructions|http://logback.qos.ch/manual/configuration.html] on how to do this, but I can't seem to get this to work. I have some debugging code in my application that verifies the system property is being set as expected:}}
{quote}{{[INFO ] c.i.s.c.IBMDefaultCodegen: SDKGEN_LOGLEVEL=DEBUG this.class=IBMJavaCodegen}}
{quote}
{{But logback-classic seems to not want to use that system property value. What am i doing wrong? :)}}
{{I'll attach my full logback.xml file to this issue for reference.}}
==============================
This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)
More information about the logback-dev
mailing list