Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Logging

  1. #1

    Default Logging

    Hi - I have a wrapper for Kettle that allows me to invoke jobs through a web application and / or quartz. Things appear to be working well.

    I have noticed that the information being logged is limited and entries are being logged to the console even though I removed the console appender. The following is an example of the log entry :

    Code:
    2007-11-03 10:31:54,406 ERROR [UpdateJobStatus-Error] - <UpdateJobStatus-Error - Errors detected!>
    To remove the console appender, I :

    Code:
    LogWriter.getInstance().removeAppender(LogWriter.getInstance().getConsoleAppender());
    What I really would like is the logging to go to a string appender, so that I can print out the log for a job on completion. I create the string appenders as follows:

    Code:
    Log4jStringAppender kettleStringAppender = LogWriter.createStringAppender();
    LogWriter lettleLogger = LogWriter.getInstance("ETLService-"+ getThreadName(), false, LogWriter.LOG_LEVEL_BASIC); 
    kettleLogger.setLogLevel(kettleContext.getKettleLogLevel());
    kettleLogger.addAppender(kettleStringAppender);
    Thanks for your help

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    Well raise a JIRA request at http://jira.pentaho.org/browse/PDI

    However there are already several JIRA trackers open for similar things... so maybe add your data there or vote for them. Related requests:
    http://jira.pentaho.org/browse/PDI-387
    http://jira.pentaho.org/browse/PDI-345
    http://jira.pentaho.org/browse/PDI-43
    http://jira.pentaho.org/browse/PDI-42

    Regards,
    Sven

  3. #3

    Default

    Sven - thanks. I looked at the JIRA issues and I believe that mine is a different issue - an error with how I am setting up / using LogWriter.

    Regardless of the log level I specify when creating the logwriter I get basic information and am unable to tell why a job failed. When I run the same job in Spoon, I get more details logging.

  4. #4
    Join Date
    May 2006
    Posts
    4,882

    Default

    Raise a JIRA tracker ;-)

  5. #5
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    We already have our own String appender in PDI.

    The class is called Log4jStringAppender and you can create one using LogWriter.
    There are also plenty of examples in the source code.

    Matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.