humanmade / Cavalcade-Runner

Daemon for Cavalcade, a scalable WordPress jobs system.
https://engineering.hmn.md/projects/cavalcade/
54 stars 26 forks source link

Change logging to less verbose #35

Open onnimonni opened 7 years ago

onnimonni commented 7 years ago

Currently logging looks like this:

worker.1  | [11] Running wp cavalcade run 11 (wp_scheduled_auto_draft_delete a:0:{})
worker.1  | [11] Started worker
worker.1  | [11] Worker status: Array
worker.1  | (
worker.1  |     [command] => wp cavalcade run 11
worker.1  |     [pid] => 52
worker.1  |     [running] =>
worker.1  |     [signaled] =>
worker.1  |     [stopped] =>
worker.1  |     [exitcode] => 0
worker.1  |     [termsig] => 0
worker.1  |     [stopsig] => 0
worker.1  | )
worker.1  |
worker.1  | [11] Worker shutting down...
worker.1  | [11] Worker out:
worker.1  | [11] Worker err:
worker.1  | [11] Worker ret: 0

Could we just log one line like nginx? I had something like this in mind:

 [11] [28/Jul/2017:14:43:41 +0000] START wp_scheduled_auto_draft_delete a:0:{}
 [11] [28/Jul/2017:14:43:45 +0000] END wp_scheduled_auto_draft_delete 0 ["output"] ["error text"]