Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Configure logging

  1. #1
    Join Date
    Apr 2009
    Posts
    26

    Default Configure logging

    Hello,

    I create the LogWriter instance (error log level = 1)

    Code:
    LogWriter.getInstance(1);
    Then I add a StringAppender
    Code:
    LogWriter.createStringAppender();
    It works perfectly.

    Some problems:

    Although I set the log level = error I get more info than expected.
    ... ...
    INFO 28-07 17:45:21,722 - Warehouse - Initialising 3 steps...
    INFO 28-07 17:45:21,723 - URL.0 - Running on slave server #0/1.
    ... ...

    How can I set to get just the errors log?

    How can I configure to disable default console log?

    Thanks in advance.


    Regards,
    Mikel.

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

    Default

    The logging level ONLY applies to the Kettle logging and appenders that we created. What you are seeing is the raw Log4J logging on the console.
    In the String appender, you'll only see the errors.

    Log4J is configures through ... a log4j configuration file :-)

    As mentioned earlier the latest version works better with said configuration.

    Matt

  3. #3
    Join Date
    Apr 2009
    Posts
    26

    Default

    Hello,

    Code:
    log = LogWriter.getInstance(1);
    stringAppender = LogWriter.createStringAppender();
    log.addAppender(stringAppender);
    //Run the transformation
    LogWriter.getInstance().close();
    String logContent = stringAppender.toString();
    In logContent I get the same log as default. (not only error info)

    Thank in advance.

    Regards,
    Mikel.

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

    Default

    You're welcome!

  5. #5
    Join Date
    Apr 2009
    Posts
    26

    Default

    Hello,

    In my last post I attached the code I'm using.

    But with this code the log contains more than error info, although I configure it with errorLevel = 1.

    Any suggestion?

    Regards,
    Mikel.

Tags for this Thread

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.