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.
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2355
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.
mazz, any more recent thoughts?
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.
I still think this would be a good thing to do.