Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Pan & logging level

  1. #1

    Question Pan & logging level

    Greetings!

    I have several transformations running every night to load
    in a datamart with Pan.

    Each shell script I created has a pre-determined logging e.g.
    Code:
    pan.sh -file="/KTR/Receivers.ktr" -level=Detailed >> /LOG/trans.log
    If the return code is different than 0, an email is sent to an
    operator with the log file of the transformation.

    If the return code is 0, an email is sent to me as notification
    that the transformation completed without error.

    The issue is that the log file is at the same level for both
    the operator and I.

    Ideally, I would like to receive an email with Minimal logging
    when the transformation is successful. An operator would receive
    an email with Detailed logging in case of failure.

    Is there a way to conditionally trigger a logging level??

    Thanks.
    Pentaho Data Integration CE 5.3.0.x
    JDK 1.7
    OS X Yosemite version 10.10.x
    MySQL 5.5.37
    Amazon Redshift
    Pacific Standard Time

  2. #2
    Join Date
    Feb 2009
    Posts
    296

    Default

    With PDI 3.1 or 3.2 the log4j logger was changed from root to something more appropriate. You can pass a log4j.conf file to the JVM and would gain control over the number and threshold of logfiles.

    Maybe that helps
    Fabian,
    doing ETL with his hands bound on his back

  3. #3

    Default

    Quote Originally Posted by fabianS View Post
    With PDI 3.1 or 3.2 the log4j logger was changed from root to something more appropriate. You can pass a log4j.conf file to the JVM and would gain control over the number and threshold of logfiles.

    Maybe that helps
    Mmmm...okay. I won't pretend to be a Java expert but I coded another app that outputs processing info to a log4j logger and what you are saying does not add up.

    In the class I wrote, informational messages are output to a logger.info() method, errors to logger.error() etc.

    What I am suspecting is that I would have to customize Pan (i.e. code+rebuild) to do the latter when running a transformation.

    The `log4j.conf` will only pre-format my output, whichever way I want it.

    Please let me know if I misunderstood you.
    Pentaho Data Integration CE 5.3.0.x
    JDK 1.7
    OS X Yosemite version 10.10.x
    MySQL 5.5.37
    Amazon Redshift
    Pacific Standard Time

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

    Default

    Is there a way to conditionally trigger a logging level??
    Simple answer: no.

  5. #5
    Join Date
    Feb 2009
    Posts
    296

    Default

    I'm no expert on log4j but I thought you could have two appenders for the Pentaho logger and set different thresholds for them. This should enable what you're trying to accomplish - two different logfiles one detailed and one not really detailed.
    Fabian,
    doing ETL with his hands bound on his back

  6. #6

    Default

    Hi acbonnemaison,

    Is there any chance you could help me out in writing the script that you mentioned below. I am really new at this of scripting and have very little idea on how to check the error codes and doing different things depending on the code.

    thanks,
    Gonzalo

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.