jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x SCM Changelog Plugin
  • MSCMCHGLOG-8

Plugin produces too much log at INFO level while analyzing log messages

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.1
  • Component/s: Report / Mojo
  • Labels:
    None
  • Environment:
    scmchangelog 1.0

Description

While analyzing scm log messages scmchangelog plug-in unnecessarily produces a log message per scm log entry at what I think is too high, INFO, level. These log messages maybe would be interesting while debugging, but not in normal use of plug-in. Since Java Logging API is being used, I propose these messages to be logged at most at FINE level. Attached is a patch which makes necessary changes.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    scmchangelog-maven-plugin-analyseloglevel.patch
    28/Oct/08 9:16 AM
    1 kB
    Stevo Slavic

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Benjamin Bentmann added a comment - 28/Oct/08 10:06 AM

Side note: Maven plugins should not use JDK logging but the mojo/plexus logger injected by Maven. Otherwise, plugins bypass the logging configuration of Maven.

Show
Benjamin Bentmann added a comment - 28/Oct/08 10:06 AM Side note: Maven plugins should not use JDK logging but the mojo/plexus logger injected by Maven. Otherwise, plugins bypass the logging configuration of Maven.
Hide
Permalink
Emmanuel Hugonnet added a comment - 30/Oct/08 4:04 AM

I do agree but how do you get a logger when unit testing ?
I will remove JDK logging.

Show
Emmanuel Hugonnet added a comment - 30/Oct/08 4:04 AM I do agree but how do you get a logger when unit testing ? I will remove JDK logging.
Hide
Permalink
Emmanuel Hugonnet added a comment - 30/Oct/08 9:40 AM

Fixed with revision 7975.
Traces set to debug, and using Maven logger.

Show
Emmanuel Hugonnet added a comment - 30/Oct/08 9:40 AM Fixed with revision 7975. Traces set to debug, and using Maven logger.
Hide
Permalink
Benjamin Bentmann added a comment - 30/Oct/08 11:35 AM

how do you get a logger when unit testing ?

The maven-plugin-api provides a SystemStreamLog. That can either be injected into the component under test by the test controller or the component itself can return this if no other logger has been set before (c.f. impl of AbstractMojo.getLog()).

Show
Benjamin Bentmann added a comment - 30/Oct/08 11:35 AM
how do you get a logger when unit testing ?
The maven-plugin-api provides a SystemStreamLog. That can either be injected into the component under test by the test controller or the component itself can return this if no other logger has been set before (c.f. impl of AbstractMojo.getLog()).
Hide
Permalink
Emmanuel Hugonnet added a comment - 31/Oct/08 2:23 AM

Thank you Benjamin, the logging problem was caused by the SCM API which uses its own kind of logger (ScmLogger) and not the maven one (you need to go the the maven-scm-plugin to have one implementation). I didn't understand why I was getting the report traces but not my scm commands traces. I should have been more carefull but I did the quick hack and used the JDK Logging API.

Show
Emmanuel Hugonnet added a comment - 31/Oct/08 2:23 AM Thank you Benjamin, the logging problem was caused by the SCM API which uses its own kind of logger (ScmLogger) and not the maven one (you need to go the the maven-scm-plugin to have one implementation). I didn't understand why I was getting the report traces but not my scm commands traces. I should have been more carefull but I did the quick hack and used the JDK Logging API.

People

  • Assignee:
    Emmanuel Hugonnet
    Reporter:
    Stevo Slavic
Vote (0)
Watch (1)

Dates

  • Created:
    28/Oct/08 9:16 AM
    Updated:
    31/Oct/08 2:23 AM
    Resolved:
    30/Oct/08 9:40 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.