Bug 621619 - RFE: Provide logging support for scripts
Summary: RFE: Provide logging support for scripts
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI   
(Show other bugs)
Version: 3.0.0
Hardware: All
OS: Linux
low
medium vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-05 16:41 UTC by John Sanda
Modified: 2014-06-18 19:45 UTC (History)
1 user (show)

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:
Cloudforms Team: ---


Attachments (Terms of Use)

Description John Sanda 2010-08-05 16:41:26 UTC
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.