ADH2COB
I'm new here

Logging in fsm modules

Jump to solution

Is is possible to log items in fsm modules?

How can i do logging in fsm modules?

Where can i check the printed logs?

Is it possible to remote rebug the the installed fsm module in eclipse?

If am doing a System.put.println() is it possible to check the printed statements.

1 Solution

Accepted Solutions
bIT_sosswald
Returning Responder

Hi Ajay,

to use the FS-logging mechanism just look at the static methods of the class "de.espirit.common.base.Logging".

A simple logging example would look like this:

import de.espirit.common.base.Logging;

public class LoggingExample {

    private final Class<?> LOGGER = this.getClass();

    public void doSomeLogging(){

        Logging.logDebug("This is a debug log message.", LOGGER);

        Logging.logInfo("This is a info log message.", LOGGER);

        Logging.logWarning("This is a warning log message.", LOGGER);

        Logging.logError("This is a error log message.", LOGGER);

    }

}

If you use this logging mechanism the log messages will appear e.g. in the execution log of your schedule job if you start your module with the help of a job.

Or you can just look at the "fs-server.log" inside the directory "...\FirstSpirit5\log\"

How you can remote debug a module you can see in this post: https://community.e-spirit.com/community/developer/blog/2010/07/08/debug-a-firstspirit-server-remotl...

It is similar with eclipse.

Greetings

Sandro

View solution in original post

2 Replies
bIT_sosswald
Returning Responder

Hi Ajay,

to use the FS-logging mechanism just look at the static methods of the class "de.espirit.common.base.Logging".

A simple logging example would look like this:

import de.espirit.common.base.Logging;

public class LoggingExample {

    private final Class<?> LOGGER = this.getClass();

    public void doSomeLogging(){

        Logging.logDebug("This is a debug log message.", LOGGER);

        Logging.logInfo("This is a info log message.", LOGGER);

        Logging.logWarning("This is a warning log message.", LOGGER);

        Logging.logError("This is a error log message.", LOGGER);

    }

}

If you use this logging mechanism the log messages will appear e.g. in the execution log of your schedule job if you start your module with the help of a job.

Or you can just look at the "fs-server.log" inside the directory "...\FirstSpirit5\log\"

How you can remote debug a module you can see in this post: https://community.e-spirit.com/community/developer/blog/2010/07/08/debug-a-firstspirit-server-remotl...

It is similar with eclipse.

Greetings

Sandro

Hallo, wie schreibe ich denn in ein eigenes Modul Logfile und nicht direkt in die fs-server.log.

Zum Beispiel wenn ich in einem Modul ein projektabhängige Komponente habe und diese soll in ihr eigenes Logfile schreiben?

0 Kudos