-
1. Re: logging process execution in file instead of database
kukeltje May 28, 2007 6:40 AM (in response to pattchen)no, sorry, not by default
-
2. Re: logging process execution in file instead of database
pattchen May 28, 2007 6:45 AM (in response to pattchen)thanks Ronald,
but, why "not by default"? does this mean that there is a customized way to do this ?
Thanks. -
3. Re: logging process execution in file instead of database
kukeltje May 28, 2007 6:53 AM (in response to pattchen)lots of things are customizable in jBPM. Logging is (afaik) one of them (look at the 'services' configuration), but I have no clue on how to do that or if there are still any hidden issues (it has never been done)
-
4. Re: logging process execution in file instead of database
pattchen May 28, 2007 7:16 AM (in response to pattchen)I've looked at services configuration in jBPM doc.
By default,jBPM provides an implementation of Logging services through 2 classes:DbLoggingServiceFactory which implements ServiceFactory
DbLoggingService which implements LoggingService
I guess that for my problem, I should provide a class FileLoggingServiceFactory which must implement ServiceFactory, and is a factory for FileLoggingService which must implement LoggingService.
It doesn't seem to be easy...I'm still surprised to be the first person to have this need -:). -
5. Re: logging process execution in file instead of database
kukeltje May 28, 2007 7:33 AM (in response to pattchen)Hey, I never said it was going to be easy ;-), and why are you surprised you are the first one to need this? Can you tell why you want to replace db with file?
-
6. Re: logging process execution in file instead of database
pattchen May 28, 2007 8:47 AM (in response to pattchen)I want to replace db with file for 6 reasons:
1. process definition are in an xml file,not in a database
3. I don't want to create a database with all jBPM tables (28) just for logs.
2. information which is really interesting is the result of the process,ie OK,KO or another possible issue.
4. process executions logs are usable(in my case) just for undo or recovery purpose.
5. I don't plan to do any kind of Business Activity Monitoring task.
6. process executions logs must be deleted automatically when they reach a certain size (since I plan to use log4j,this is relatively easy to implement).
Given these reasons, is it possible to use a database for logging? -
7. Re: logging process execution in file instead of database
kukeltje May 28, 2007 10:25 AM (in response to pattchen)1: designtime it is in the DB, deploytime it is converted to db entries
3: it is only to a small extend for logs (although it might be the biggest amount of data)
2: ok
4: so try do disable them (has been discussed on the forum, also not easy, but usable for more people if you contribute)
5: ok, but only part of that is in the logs
6: a small delete statement on a db could work as well, right? I'd use log4j more for technical purposed -
8. Re: logging process execution in file instead of database
kukeltje May 28, 2007 10:32 AM (in response to pattchen)sorry
1: designtime it is xml, deploytime it is converted to db entries (unless you create it each time via your own methods) -
9. Re: logging process execution in file instead of database
pattchen May 28, 2007 12:22 PM (in response to pattchen)3: it is only to a small extend for logs (although it might be the biggest amount of data).
that's the problem!! I don't want to use a database to store process (even at deploytime). So, if I use db logging,i must create a database just for that.
(I works on a JAVA SE application which will load a process definition from an xml file every minute and execute it.)
5: ok, but only part of that is in the logs
That's good to know...6: a small delete statement on a db could work as well, right?
It's right.
Another issue I 've just think about:
Database logging is more slower than file logging (isn't it?please correct me if I'm wrong), and since the process must be executed as fast as possible (it processes a client request ),and that the only logging use case which interests me is undo functionality, db logging seems to be overkill... -
10. Re: logging process execution in file instead of database
estaub May 29, 2007 8:38 AM (in response to pattchen)Bill, Ronald,
FWIW... for ordinary log4j logging, just include a log4j.xml with an ordinary file-based appender, e.g., org.apache.log4j.RollingFileAppender, or similar.
I don't understand exactly what role DbLoggingService et al play. I wanted ordinary logging, realized that log4j wouldn't pay attention to the DbLoggingService support, and just ignored it myself!
-Ed Staub -
11. Re: logging process execution in file instead of database
kukeltje May 29, 2007 9:13 AM (in response to pattchen)Logging: http://docs.jboss.com/jbpm/v3/userguide/logging.html
It could/will be used to implement a kind of undo/rollback mechanism.
Logging related jira issues:
http://jira.jboss.com/jira/browse/JBPM-166