You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jason van Zyl (JIRA)" <ji...@codehaus.org> on 2007/01/01 01:17:09 UTC
[jira] Created: (MNG-2727) Fix Logging in threadsafe components
Fix Logging in threadsafe components
------------------------------------
Key: MNG-2727
URL: http://jira.codehaus.org/browse/MNG-2727
Project: Maven 2
Issue Type: Task
Components: Embedding
Reporter: Jason van Zyl
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MNG-2727) Fix Logging in threadsafe
components
Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=217694#action_217694 ]
Kristian Rosenvold edited comment on MNG-2727 at 4/12/10 1:27 PM:
------------------------------------------------------------------
I am a bit unsure of exactly which application use-case is being addressed in this issue;
For the current concurrency effort (MNG-3004) my current favourite strategy is replacing the LoggerManager with a ConcurrentLoggerManager that
provides a MavenProject-aware proxy for the existing logger subsystem. Such a proxy would typically be able to collect all logger output for
the project to a single outputstream, no matter how this intertwines with other builds.
A rough draft of this logic can be seen in LifecycleThreadedBuilder line 164 & 167, where the MavenProject is associated with the current thread (Code is commented out because the current implementation is not good enough). This association changes logger output, and the setThisModuleComplete releases the output.
I fully sense that there may be some other use cases, possibly related to embedding. But it seems like a solution that captures the "logical stream" that constitutes the output from a single build should be expandable to these different cases.
was (Author: krosenvold):
I am a bit unsure of exactly which application use-case is being addressed in this issue;
For the current concurrency effort (MNG-3004) my current favourite strategy is replacing the LoggerManager with a ConcurrentLoggerManager that
provides a MavenProject-aware proxy for the existing logger subsystem. Such a proxy would typically be able to collect all logger output for
the project to a single outpustream, no matter how this intertwines with other builds.
A rough draft of this logic can be seen in LifecycleThreadedBuilder line 164 & 167, where the MavenProject is associated with the current thread (Code is commented out because the current implementation is not good enough). This association changes logger output, and the setThisModuleComplete releases the output.
I fully sense that there may be some other use cases, possibly related to embedding. But it seems like a solution that captures the "logical stream" that constitutes the output from a single build should be expandable to these different cases.
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2 & 3
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assignee: Jason van Zyl
> Fix For: 3.0-beta-2
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2727) Fix Logging in threadsafe components
Posted by "Geoffrey De Smet (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=205729#action_205729 ]
Geoffrey De Smet commented on MNG-2727:
---------------------------------------
log4j has been unchanged (=dead?) for 4 years.
It's creator created slf4j with logback (AKA log4j 2), similar license, much better code, still maintained, but due to politics it never got the name "log4j 2".
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2 & 3
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assignee: Jason van Zyl
> Fix For: 3.0-alpha-7
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2727) Fix Logging in threadsafe components
Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=comments#action_83915 ]
Jason van Zyl commented on MNG-2727:
------------------------------------
If it's relavent to the API of the application yes, if you want debug output or general tracing then this falls outside the monitor. Though this is a general problem that would be solved using a more direct use of log4j and it's NDC facilities.
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assigned To: Jason van Zyl
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2727) Fix Logging in threadsafe components
Posted by "jieryn (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=216210#action_216210 ]
jieryn commented on MNG-2727:
-----------------------------
Maven should use its own logging facade which then is backed by logback (which supports NDC). Then if Geki creates something even better down the road we can swap it under the covers without any issue.
See Spring Framework for the devastation depending on a specific logging mechanism can do.
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2 & 3
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assignee: Jason van Zyl
> Fix For: 3.0-beta-1
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2727) Fix Logging in threadsafe components
Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=254964#action_254964 ]
Kristian Rosenvold commented on MNG-2727:
-----------------------------------------
I'm not really sure we need to do anything more about this issue, the 3.x logging seems to work fairly well in parallel.
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2 & 3
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assignee: Jason van Zyl
> Fix For: 3.x / Backlog
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2727) Fix Logging in threadsafe components
Posted by "Trygve Laugstol (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=comments#action_83894 ]
Trygve Laugstol commented on MNG-2727:
--------------------------------------
Shouldn't the component use a monitor instead of logging in the cases where the output is useful on a per-build basis?
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assigned To: Jason van Zyl
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2727) Fix Logging in threadsafe components
Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=217694#action_217694 ]
Kristian Rosenvold commented on MNG-2727:
-----------------------------------------
I am a bit unsure of exactly which application use-case is being addressed in this issue;
For the current concurrency effort (MNG-3004) my current favourite strategy is replacing the LoggerManager with a ConcurrentLoggerManager that
provides a MavenProject-aware proxy for the existing logger subsystem. Such a proxy would typically be able to collect all logger output for
the project to a single outpustream, no matter how this intertwines with other builds.
A rough draft of this logic can be seen in LifecycleThreadedBuilder line 164 & 167, where the MavenProject is associated with the current thread (Code is commented out because the current implementation is not good enough). This association changes logger output, and the setThisModuleComplete releases the output.
I fully sense that there may be some other use cases, possibly related to embedding. But it seems like a solution that captures the "logical stream" that constitutes the output from a single build should be expandable to these different cases.
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2 & 3
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assignee: Jason van Zyl
> Fix For: 3.0-beta-2
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2727) Fix Logging in threadsafe components
Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=comments#action_83703 ]
Jason van Zyl commented on MNG-2727:
------------------------------------
We have a general problem with plexus components that are singletons in that they use
he same logger for their lifespan. This is not good in that many requests may be fired
off and the singleton plexus component will continue to funnel their output to the same
logger. We need to be able to swap the logger.
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assigned To: Jason van Zyl
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2727) Fix Logging in threadsafe components
Posted by "Ceki Gulcu (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=216231#action_216231 ]
Ceki Gulcu commented on MNG-2727:
---------------------------------
FYI, SLF4J supports MDC but not NDC. There are counter arguments for making SLF4J an optional dependency: see http://slf4j.org/faq.html#optional_dependency
However, whether you choose to depend on SLF4J or go through your own facade, I am fairly certain that neither approach will be future proof.
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2 & 3
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assignee: Jason van Zyl
> Fix For: 3.0-beta-1
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MNG-2727) Fix Logging in threadsafe components
Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason van Zyl updated MNG-2727:
-------------------------------
Fix Version/s: (was: 3.x)
3.0-alpha-7
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2 & 3
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assignee: Jason van Zyl
> Fix For: 3.0-alpha-7
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2727) Fix Logging in threadsafe components
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240741#action_240741 ]
Brett Porter commented on MNG-2727:
-----------------------------------
since the switch to Guice happened, is there anything still left to do here, or was it taken care of as suggested in the last comment?
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2 & 3
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assignee: Jason van Zyl
> Fix For: 3.x / Backlog
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MNG-2727) Fix Logging in threadsafe components
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated MNG-2727:
------------------------------
Fix Version/s: (was: Reviewed Pending Version Assignment)
3.x
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assignee: Jason van Zyl
> Fix For: 3.x
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MNG-2727) Fix Logging in threadsafe components
Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=217698#action_217698 ]
Jason van Zyl commented on MNG-2727:
------------------------------------
Stuart is taking care of this as part of moving over to Guice. We just need to inject a threadsafe logger. There's no point in doing this in Plexus and in Guice.
> Fix Logging in threadsafe components
> ------------------------------------
>
> Key: MNG-2727
> URL: http://jira.codehaus.org/browse/MNG-2727
> Project: Maven 2 & 3
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Assignee: Jason van Zyl
> Fix For: 3.0-beta-2
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira