Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Writing logtrace from a step

  1. #1
    Join Date
    Sep 2008
    Posts
    21

    Default Writing logtrace from a step

    Hello, is it possible to write in a specified file a log, but only from a step..?

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

    Default

    You can write to the log using a javascript step e.g.

    And you can specify where the log is using pan/kitchen command lines.

    Regards,
    Sven

  3. #3
    Join Date
    Sep 2008
    Posts
    21

    Default

    hello, i've tried with javascript like this for example :
    var file = new ActiveXObject("Scripting.FileSystemObject");
    var a = file.CreateTextFile("c:\\testfile.txt", true);
    a.WriteLine("Salut cppFrance !");
    a.Close();

    but ActiveXObject is unknown ...so it doesn't work...

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

    Default

    It's javascript (the mozilla one), not JScript

    Following works and writes to the default log file.

    Code:
    // Writes a string to the defined Kettle Log.
    //
    // Usage:
    // writeToLog(var);
    // 1: String - The Message which should be written to
    // the Kettle Debug Log
    //
    // writeToLog(var,var);
    // 1: String - The Type of the Log
    // d - Debug
    // l - Detailed
    // e - Error
    // m - Minimal
    // r - RowLevel
    //
    // 2: String - The Message which should be written to
    // the Kettle Log
    //
    // 2006-11-21
    //
    writeToLog("Hello World!");
    writeToLog("r", "Hello World!");
    You can open your own file with javascript and write to that but that would be plain silly.

    Regards,
    Sven

  5. #5
    Join Date
    Sep 2008
    Posts
    21

    Default

    Yes you're right i'm just stupid!!!! i've seen it just after i post my last message thank you!

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.