Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How can we setup our log files to be written in a database?

Question:

How can we setup our log files to be written in to a database ?

Answer:

Starting with release 1.7 JobScheduler requires a database, see 

Jira
serverSOS JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId6dc67751-9d67-34cd-985b-194a8cdc9602
keyJS-1143

JobScheduler writes log files to the database for which a connection is configured with the This is automatically done by JobScheduler, if you configure a database connection in ./config/factory.ini JobScheduler creates protocols  file. This includes logs for tasks and orders, have a look at the detailed explanation. of log files.see log file documentation.

Settings in the To name a few settings in ./config/factory.inifile include:

Code Block
  ;                         enable job history, if set to yes the
  ;                         scheduler keeps a job history in
  ;                         csv files or database tables
  history                 = yes
  ;                         store job protocol for task history
  ;                         (yes|no|gzip, default: no)
  history_with_log        = gzip
  ;                         store job protocol for order history
  ;                         (yes|no|gzip, default: no)
  order_history_with_log  = gzip
  ;                         store protocol for scheduler history
  ;                        (yes|no|gzip, default: no)
  history_archive         = gzip

...

 

This examples specifies protocols logs to be stored in blob columns of the database in a gzip format, for a complete list of settings see the factory.ini reference documentation. Both the JobScheduler Operations Center (JOC) web interface and the JobScheduler Information Dashboard (JID) allow to retrieve the job history and to be searched and display log file content to be shown. You can remove the log files from disk and keep them in the database.

We provide a set of standard jobs concerned with logging and cleanup that rotate logs, remove debug entries from logs in the database and gzip log files on disk. ... read more