[JIRA] Created: (LBCLASSIC-321) set root level and log home (base) path for file appenders using MDC (context?) properties

View: New views
4 Messages — Rating Filter:   Alert me  

[JIRA] Created: (LBCLASSIC-321) set root level and log home (base) path for file appenders using MDC (context?) properties

by JIRA noreply-jira@qos.ch :: Rate this Message:

| View Threaded | Show Only this Message

set root level and log home (base) path for file appenders using MDC (context?) properties
------------------------------------------------------------------------------------------

                 Key: LBCLASSIC-321
                 URL: http://jira.qos.ch/browse/LBCLASSIC-321
             Project: logback-classic
          Issue Type: New Feature
          Components: joran
            Reporter: Miroslav Obradovic
            Assignee: Logback dev list


would it be possible to keep application depend only on slf4j at compile time, but still be able to pass context properties to logback.xml through MDC in a standalone app, assuming I take care not to get/access any loggers until I put the context properties into MDC?

(I am aware that I could programatically get the root logger by name and cast it to logback Logger, and then set the level, and add a file appender, but this would require logback jars at compile time)


--
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

       
_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev

[JIRA] Commented: (LBCLASSIC-321) set root level and log home (base) path for file appenders using MDC (context?) properties

by JIRA noreply-jira@qos.ch :: Rate this Message:

| View Threaded | Show Only this Message


    [ http://jira.qos.ch/browse/LBCLASSIC-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12350#action_12350 ]

Ralph Goers commented on LBCLASSIC-321:
---------------------------------------

The problem with any solution to this is what to do if Logback is not the logging implementation?

> set root level and log home (base) path for file appenders using MDC (context?) properties
> ------------------------------------------------------------------------------------------
>
>                 Key: LBCLASSIC-321
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-321
>             Project: logback-classic
>          Issue Type: New Feature
>          Components: joran
>            Reporter: Miroslav Obradovic
>            Assignee: Logback dev list
>
> would it be possible to keep application depend only on slf4j at compile time, but still be able to pass context properties to logback.xml through MDC in a standalone app, assuming I take care not to get/access any loggers until I put the context properties into MDC?
> (I am aware that I could programatically get the root logger by name and cast it to logback Logger, and then set the level, and add a file appender, but this would require logback jars at compile time)

--
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

       
_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev

[JIRA] Commented: (LBCLASSIC-321) set root level and log home (base) path for file appenders using MDC (context?) properties

by JIRA noreply-jira@qos.ch :: Rate this Message:

| View Threaded | Show Only this Message


    [ http://jira.qos.ch/browse/LBCLASSIC-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12351#action_12351 ]

Miroslav Obradovic commented on LBCLASSIC-321:
----------------------------------------------

If Logback is not the logging implementation, it simply wouldn't have any effect unless the alternative logging impl. also knows how to make use of config properties added to MDC.
The application source code would still be neat and only have slf4j compile time dependency.

On the other hand, if deployment guys still decide not to use Logback, they are doing it only to their disadvantage.
In short, the focus would be on having a single compile time dependency (slf4j). Of course, still use Logback for deployment because it is the best solution for logging.


> set root level and log home (base) path for file appenders using MDC (context?) properties
> ------------------------------------------------------------------------------------------
>
>                 Key: LBCLASSIC-321
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-321
>             Project: logback-classic
>          Issue Type: New Feature
>          Components: joran
>            Reporter: Miroslav Obradovic
>            Assignee: Logback dev list
>
> would it be possible to keep application depend only on slf4j at compile time, but still be able to pass context properties to logback.xml through MDC in a standalone app, assuming I take care not to get/access any loggers until I put the context properties into MDC?
> (I am aware that I could programatically get the root logger by name and cast it to logback Logger, and then set the level, and add a file appender, but this would require logback jars at compile time)

--
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

       
_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev

[JIRA] Commented: (LBCLASSIC-321) set root level and log home (base) path for file appenders using MDC (context?) properties

by JIRA noreply-jira@qos.ch :: Rate this Message:

| View Threaded | Show Only this Message


    [ http://jira.qos.ch/browse/LBCLASSIC-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12352#action_12352 ]

Ralph Goers commented on LBCLASSIC-321:
---------------------------------------

Actually, anything you put in the MDC will have an impact on an alternative logging impl as that data will be treated like any other MDC data.

As for Logback being the best solution, I will have to disagree, but on that topic I freely admit I am biased.  

> set root level and log home (base) path for file appenders using MDC (context?) properties
> ------------------------------------------------------------------------------------------
>
>                 Key: LBCLASSIC-321
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-321
>             Project: logback-classic
>          Issue Type: New Feature
>          Components: joran
>            Reporter: Miroslav Obradovic
>            Assignee: Logback dev list
>
> would it be possible to keep application depend only on slf4j at compile time, but still be able to pass context properties to logback.xml through MDC in a standalone app, assuming I take care not to get/access any loggers until I put the context properties into MDC?
> (I am aware that I could programatically get the root logger by name and cast it to logback Logger, and then set the level, and add a file appender, but this would require logback jars at compile time)

--
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

       
_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev