Export to GitHub

ncron - issue #3

Provide a logging interface in the core framework


Posted on Jan 6, 2010 by Quick Horse

All serious applications of a cron system will require some level of logging. NCron should support logging right out of the box, and the service itself should record all job executions and failures to the log.

Logging should be done through an interface, allowing integration with third-party logging frameworks.

Comment #1

Posted on Jan 7, 2010 by Quick Horse

(No comment was entered for this change.)

Comment #2

Posted on Jan 7, 2010 by Quick Horse

Default log should ignore debug log entries, and log everything else to the Windows event log.

Comment #3

Posted on Jan 17, 2010 by Quick Horse

NCron.Framework.Logging namespace contains interfaces for logs and log factories, as well as default implementations using the event log.

NCron.Integration.log4net project contains an implementation of the logging interfaces, integrating the popular "log4net" library.

NCron.Service.SchedulingService uses the injected log factory to create log instances for each job, providing the log to the job through the CronContext. Furthermore, it writes a "info" level message before each job execution, and an "error" level message if a job throws an unhandled exception.

NCron.Serice.Program (main entry point) explicitly uses the event log for all fatal events (unhandled exceptions in NCron itself, or in custom log implementations).

Status: Fixed

Labels:
Type-Enhancement Priority-High Milestone-Release2.0 Component-Framework