Hello

In our OFBIz projects we often work with scheduled jobs. Since it is often useful to view the logging output of a job, we created a mechanism for writing this output to a file and making it accessable over the OFBIz JobList. We extended the service-declaration with a parameter called "own-logfile" with specifies the name of the logfile to use. When a job is executed, a timestamp is appended to this filename to guarantee unique filenames. We modified the class GenericServiceJob to register an appender for the current thread if this property is set and unregister it when the job is done. The name of the logfile is stored in JobSandbox and is used to allow downloading the file from the JobList and for deleting the logfile when the purgeOldJobs service runs. We would like to contribute our code if others find this idea useful. If you have any suggestions to improve our idea or to integrate it better with OFBIz, please let us know.


Best regards

--
Philipp Hoppen,
nowhow solutions AG, Laupenstrasse 1, CH-3008 Bern
Phone +41 (0)31 380 00 71 http://www.nowhow.ch

Reply via email to