Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Write log to file from Java code

  1. #1
    Join Date
    Jul 2007
    Posts
    1,013

    Default Write log to file from Java code

    Greets.

    Resuming my series of questions on Kettle and Java code, I have yet another inquiry :P

    I'd like to write the Kettle log to a text file of my choice, but even though I've tried to understand the API and looked at the Kitchen source, I couldn't come up with a solution.

    Would anyone care to enlighten me with an example, or point in the right direction?

    Thanks in advance.

    Cheers!

  2. #2
    Join Date
    Nov 2007
    Posts
    3

    Default

    Even I am looking for something simillar. I am running the transforms from with in the Java code. I want to write logs to a specific file for each transform.

  3. #3

    Talking

    Quote Originally Posted by tdidomenico View Post
    Greets.

    Resuming my series of questions on Kettle and Java code, I have yet another inquiry :P

    I'd like to write the Kettle log to a text file of my choice, but even though I've tried to understand the API and looked at the Kitchen source, I couldn't come up with a solution.

    Would anyone care to enlighten me with an example, or point in the right direction?

    Thanks in advance.

    Cheers!
    It seems that Kettle uses Apache's LOG4J to output its trace. Have you looked at the Source code, specifically the Javadoc API? It should be your starting point.

    My advice to you would be to look at that entry on Matt's blog on the topic of error handling:

    http://www.ibridge.be/?p=32

    I have tweaked my transformations to output to a text file. It works like a charm.

    My suggestion is to modify your transformation using Matt's example and launch it with your Java wrapper. That should give you what you want.

    Al.
    Last edited by acbonnemaison; 11-14-2008 at 12:42 PM.

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.