Maven
  1. Maven
  2. MNG-2727

Fix Logging in threadsafe components

    Details

    • Type: Task Task
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 3.x / Backlog
    • Component/s: Embedding
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Activity

      Hide
      Kristian Rosenvold added a comment - - edited

      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.

      Show
      Kristian Rosenvold added a comment - - edited 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.
      Hide
      Jason van Zyl added a comment -

      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.

      Show
      Jason van Zyl added a comment - 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.
      Hide
      Brett Porter added a comment -

      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?

      Show
      Brett Porter added a comment - 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?
      Hide
      Kristian Rosenvold added a comment -

      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.

      Show
      Kristian Rosenvold added a comment - 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.
      Hide
      Michael Osipov added a comment -

      Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

      Assignee, if you think you can fix this bug anytime soon, please reopen and proceed appropriately.

      Show
      Michael Osipov added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out. Assignee, if you think you can fix this bug anytime soon, please reopen and proceed appropriately.

        People

        • Assignee:
          Jason van Zyl
          Reporter:
          Jason van Zyl
        • Votes:
          4 Vote for this issue
          Watchers:
          5 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: