Enable Siebel logs – Video tutorial

I have mentioned in many of my articles about importance of logs and how to enable them. Today I am posting a video tutorial showing how to enable logs through environmental variables in windows environment for dedicated client and tools.

I hope this will help newbies in using logs and debugging issues easy.

Click on the Download link below to download video

Download Video

In video you will see me setting the value of variable SIEBEL_LOG_EVENTS as ALL but you can also set it as any integer value between 1-5 though 3 and 5 are often used values where 5 means logs will be as detailed as they can be and 3 means logs in less details.

9 Responses to Enable Siebel logs – Video tutorial

  1. Hi neel,

    toxcct again :)

    On our project, to test some of our big scripts, I made our logging system, which is done like this:

    - In ‘Administration – Application > System Preferences’, I added a record:
    Name : eScript Log_Debug Active
    Value : TRUE (or FALSE)

    - In every script to have debug logs, here are what to add:
    -> In the “(declaration)” Section:
    var bDebugModeOn = (TheApplication().GetProfileAttr(“eScript Log_Debug Active”) == “TRUE”);
    var strLogDebugFile = Clib.getcwd() + “\..\log\eScript – BC [" + this.Name() + "].log”;
    The first global variable gets the state of the System Preference once and sets in a boolean if the logs are enabled or not.
    The second global variable sets the log output file. Like it’s done here, it will be written in the log/ folder of the application. Of course, if we’re changing ‘BC’ with ‘Applet’ or ‘BS’ depending on what kind of script we’re debugging.

    -> and we’re declaring the following function:
    function Log_Debug(DataString) {
    if (bDebugModeOn) {
    var file = Clib.fopen(strLogDebugFile,’at’);
    var d = Date.fromSystem(Clib.time());
    var dt = Clib.rsprintf(“%02d/%02d/%04d %02d:%02d:%02d”,
    d.getMonth()+1, d.getDate(), d.getFullYear(),
    d.getHours(), d.getMinutes(), d.getSeconds());
    DataString = “[" + dt + "] ” + DataString;
    Clib.fputs(DataString + “n”, file);
    Clib.fclose(file);
    }
    }

    - Then each time we have to log some stuff, we do this :
    Log_debug(“Hello World !”);
    (of course, adapt the string you want to log ^^ )

    Like this, a log file in the application logs directory will be created with the same name than your buscomp/applet/busService, and only when the System Preference is enabled…

  2. Hi neel,

    toxcct again :)

    On our project, to test some of our big scripts, I made our logging system, which is done like this:

    - In ‘Administration – Application > System Preferences’, I added a record:
    Name : eScript Log_Debug Active
    Value : TRUE (or FALSE)

    - In every script to have debug logs, here are what to add:
    -> In the “(declaration)” Section:
    var bDebugModeOn = (TheApplication().GetProfileAttr(“eScript Log_Debug Active”) == “TRUE”);
    var strLogDebugFile = Clib.getcwd() + “\\..\\log\\eScript – BC [" + this.Name() + "].log”;
    The first global variable gets the state of the System Preference once and sets in a boolean if the logs are enabled or not.
    The second global variable sets the log output file. Like it’s done here, it will be written in the log/ folder of the application. Of course, if we’re changing ‘BC’ with ‘Applet’ or ‘BS’ depending on what kind of script we’re debugging.

    -> and we’re declaring the following function:
    function Log_Debug(DataString) {
    if (bDebugModeOn) {
    var file = Clib.fopen(strLogDebugFile,’at’);
    var d = Date.fromSystem(Clib.time());
    var dt = Clib.rsprintf(“%02d/%02d/%04d %02d:%02d:%02d”,
    d.getMonth()+1, d.getDate(), d.getFullYear(),
    d.getHours(), d.getMinutes(), d.getSeconds());
    DataString = “[" + dt + "] ” + DataString;
    Clib.fputs(DataString + “\n”, file);
    Clib.fclose(file);
    }
    }

    - Then each time we have to log some stuff, we do this :
    Log_debug(“Hello World !”);
    (of course, adapt the string you want to log ^^ )

    Like this, a log file in the application logs directory will be created with the same name than your buscomp/applet/busService, and only when the System Preference is enabled…

  3. hi neel am unable to download this video…plz send this to my mail id siebelexplorer87@gmail:disqus .com

    Thanks

  4. hi neel am unable to download this video…plz send this to my mail id siebelexplorer87@gmail:disqus .com

    Thanks

Leave a Reply

Contribute