Bug 535685 (RHQ-2355) - RFE: provide plugins with their own logger to their own log file
Summary: RFE: provide plugins with their own logger to their own log file
Keywords:
Status: NEW
Alias: RHQ-2355
Product: RHQ Project
Classification: Other
Component: Plugin Container
Version: unspecified
Hardware: All
OS: All
low
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-14 14:23 UTC by John Mazzitelli
Modified: 2024-03-04 13:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description John Mazzitelli 2009-08-14 14:23:00 UTC
It would be nice if our resource contexts and discovery contexts had a "getLogger()" method that returns a commons logger object that allows a plugin to log messages in their own log file (say, to "logs/plugins/<plugin-name>.log")

We'd have to programatically create the log4j appender at runtime when the plugin requests the logger for the first time.

Comment 1 Red Hat Bugzilla 2009-11-10 21:02:47 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2355


Comment 2 Joseph Marques 2010-11-17 16:55:57 UTC
mazz, interesting.  i think this would be very useful from a maintenance standpoint.  if a user/customer is having an issue with their, say, apache or vhost resources...then all we'd need is their apache plugin log file.  however, this becomes more complicated if the hibernate plugin logs to its own log file, which is then injected into several other plugins for reuse.  can you elaborate a bit more on how you would expect these loggers to work in the context of plugin inheritance - injection / extension.

Comment 3 Corey Welton 2010-11-22 18:04:45 UTC
mazz, any more recent thoughts?

Comment 4 John Mazzitelli 2010-11-22 18:23:04 UTC
we could have one logger per resource INSTANCE. in that case, injection/extension shouldn't matter. I don't know how to implement this - all I know is, from an API perspective, it would be cool for a plugin developer to be given his own log file. Is that one log file per plugin? one log file per resource instance? one log file per resource type? I'm not sure. I just figured it was a neat request to put on the list for further discussion as a future API enhancement.

Comment 5 Jay Shaughnessy 2014-05-09 15:44:10 UTC
I still think this would be a good thing to do.

Comment 6 Jay Shaughnessy 2014-05-09 15:44:37 UTC
I still think this would be a good thing to do.


Note You need to log in before you can comment on or make changes to this bug.