This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 535685 - (RHQ-2355) RFE: provide plugins with their own logger to their own log file
RFE: provide plugins with their own logger to their own log file
Status: NEW
Product: RHQ Project
Classification: Other
Component: Plugin Container (Show other bugs)
unspecified
All All
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
http://jira.rhq-project.org/browse/RH...
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-14 10:23 EDT by John Mazzitelli
Modified: 2015-02-01 18:29 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Mazzitelli 2009-08-14 10:23:00 EDT
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 16:02:47 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2355
Comment 2 Joseph Marques 2010-11-17 11:55:57 EST
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 13:04:45 EST
mazz, any more recent thoughts?
Comment 4 John Mazzitelli 2010-11-22 13:23:04 EST
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 11:44:10 EDT
I still think this would be a good thing to do.
Comment 6 Jay Shaughnessy 2014-05-09 11:44:37 EDT
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.