You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2009/12/05 01:17:20 UTC

[jira] Commented: (OFBIZ-2042) Individual logfiles for scheduled jobs

    [ https://issues.apache.org/jira/browse/OFBIZ-2042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786257#action_12786257 ] 

Jacques Le Roux commented on OFBIZ-2042:
----------------------------------------

[Related thread|http://n4.nabble.com/Re-svn-commit-r719836-in-ofbiz-trunk-framework-base-src-org-ofbiz-base-util-service-entitydef-servic-td198500.html#a198500]

> Individual logfiles for scheduled jobs
> --------------------------------------
>
>                 Key: OFBIZ-2042
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2042
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Philipp Hoppen
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: joblog.diff, joblogging.diff
>
>
> It is useful to have the ability to see the logs of a single scheduled job on the job list. 
> In implementation (see attached patch) the user can specify whether he wants an individual logfile or not using a checkbox when he schedules the job. The information is passed from scheduleService() in CoreEvents.java to the Dispatcher class and finally to the JobManager, where it is stored in the ownLogfile field of the JobSandbox entity. 
> When the job runs, JobInvoker initializes the job-thread with an own ThreadGroup. PersistentServiceJob then checks for the ownLogfile field of the job and eventually initializes the logLocation (using serviceName+ timestamp value) , which is stored in another field on JobSandbox. PersistentServiceJob passes the logLocation using setLogLocation() on GenericServiceJob, which in turn calls registerCurrentThreadGroupLogger on the Debug class. Debug maintains a list of these loggers for each running job and sends them the log entries when log() is called. After the job finished the logger is unregistered.
> On the Job List there the ownLogfile field is displayed (useful to find out if pending jobs will generate own logfile) and eventually a link to "View Log" (which receives a jobId parameter that is checked for in LogView.groovy). 
> in purgeOldJobs() there are some lines to check for ownLogfile and to delete the physical logfile.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.