Bug 621619 - RFE: Provide logging support for scripts
RFE: Provide logging support for scripts
Status: NEW
Product: RHQ Project
Classification: Other
Component: CLI (Show other bugs)
3.0.0
All Linux
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-05 12:41 EDT by John Sanda
Modified: 2014-06-18 15:45 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
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:


Attachments (Terms of Use)

  None (edit)
Description John Sanda 2010-08-05 12:41:26 EDT
Description of problem:
I have written more than one script now in which I have resorted to println() calls for logging which is less than ideal for anything other than the most trivial of scripts.

Commons Logging is on the classpath and available for use, but that is probably not intuitive as it is something that is not advertised. And trying the following from the interactive shell does not work,

$ logger = org.apache.commons.logging.LogFactory.getLog(this.getClass())

but,

$ logger = org.apache.commons.logging.LogFactory.getLog("myscript")

does work, however, I do not see anything written to the log file. Instead, I'd prefer not to directly expose Commons Logging and instead provide a logger and/or log factory object in the script bindings.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

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