Problem logging
Hi everyone.
I wanted to use the BPM studio log to print some info while developing, but I'm not able to do so. I have a really simple example (a task with a connector) with the following code:
import java.util.logging.Logger;
Logger logger= Logger.getLogger("org.bonitasoft");
logger.info("Log: infor");
logger.warning("Log: warning");
logger.severe("Log: severe");
However, the studio log does not contain these messages. The log looks like this:
!ENTRY org.bonitasoft.studio.engine 1 0 2017-10-02 11:11:07.363
!MESSAGE Attempt to login as helen.kelly
!ENTRY org.bonitasoft.studio.engine 1 0 2017-10-02 11:11:07.392
!MESSAGE Login successful.
!ENTRY org.bonitasoft.studio.engine 1 0 2017-10-02 11:11:07.710
!MESSAGE Building bar for process Pool3 (1.0 )...
!ENTRY org.bonitasoft.studio.engine 1 0 2017-10-02 11:11:07.710
!MESSAGE Expression of input separator is null for connector null
!ENTRY org.bonitasoft.studio.engine 1 0 2017-10-02 11:11:07.710
!MESSAGE Expression of input outputType is null for connector null
!ENTRY org.bonitasoft.studio.engine 1 0 2017-10-02 11:11:07.845
!MESSAGE Build complete for process Pool3 (1.0 ).
!ENTRY org.bonitasoft.studio.engine 1 0 2017-10-02 11:11:07.881
!MESSAGE Attempt to login as helen.kelly
!ENTRY org.bonitasoft.studio.engine 1 0 2017-10-02 11:11:07.888
!MESSAGE Login successful.
!ENTRY org.bonitasoft.studio.engine 1 0 2017-10-02 11:11:08.048
!MESSAGE Attempt to login as helen.kelly
!ENTRY org.bonitasoft.studio.engine 1 0 2017-10-02 11:11:08.056
!MESSAGE Login successful.
I already modified the config.ini and set eclipse.log.level=ALL.
What can be the problem here?
Thanks in advance.
Best
As already answered by Dibyajit, you need to look at Engine log file when you produce the log in a code executed by Bonita Engine (such as all Groovy script, connectors... that are part of your process definition).
Studio log file is helpful to get more detail about issues that are related to usage of Studio it self. For example it can help to understand why the build of a process failed.
On Linux you can clear the log file with the following command: echo > catalina.out
But as a general recommendation I would suggest not to edit the log file and rather configure log size limit and rotation.
Comments
Hi Antoine
Thanks for the Update.
Is it possible to configure any other log apart from Engine Log and Studio Log.
Actually , If we can maintain a separate log to catch errors specific to our process.
Then we can track process and its errors separately.
As already used in other Software's, we can read and write to log files specific from a location.
thanks .
Hi,
thank you both for the answers. I like the idea of having a separate log file for debugging but as I'm not sure how to configure and create a new handler I think I will be fine with clearing the log myself via terminal for the moment :)
Thanks again
Best
Works like a charm. Thanks!
Comments
Hello
Check the Engine logs.
I think , By default all logs are stored in engine logs.
regards
Hi and thank for your answer.
Indeed the debug messages were written in the engine log!
However that was only half of my issue. Turns out that if I edit and save the engine log (e.g. I delete old logs messages), Bonita does not any longer write on it. Restarting the Bonita BPM seems to fix the issue...but then if I edit and save the log I'm back to the starting problem. Strange behavior but ok.
However, thanks for the help!
Best