bake monolog into the container and add installer plugin to configure - #33
bake monolog into the container and add installer plugin to configure#33ufundo wants to merge 1 commit into
Conversation
| return; | ||
| } | ||
|
|
||
| \Civi\Setup::log()->info(sprintf('[%s] Handle %s', basename(__FILE__), 'installDatabase')); |
There was a problem hiding this comment.
What happens when an attempt to log an info message occurs prior to initiation of logging infrastructure? Perhaps we should hold off until successful install has completed.
There was a problem hiding this comment.
This is standard boilerplate from all of the installer plugins, and is using a bespoke logger I think. It is printed to screen if you install with cv, not sure if it goes anywhere on web install.
|
|
||
| // create new config to pass all to stdout | ||
| \Civi\Api4\Monolog::create(FALSE) | ||
| ->addValue('name', 'docker_std_out') |
There was a problem hiding this comment.
I'm Bikeshedding here, but the name is stdout not std_out.
There was a problem hiding this comment.
std_out is used throughout the existing monolog extension code... so I was following that I guess?
https://lab.civicrm.org/extensions/monolog/-/blob/master/Civi/MonoLog/MonologManager.php?ref_type=heads#L122
a) enable Monolog on install;
b) configure it to disable the standard monolog configs, and add a single config which directs all logs to stdout => so they show in the docker logs
The monolog release is a slightly forked version . This is because the main branch currently restricts
stdoutlogs to when you are using CLI - whereas we want web requests to send their logs through to stdout also. I also did a manual package release with the monolog composer dependencies.Hopefully we can get that merged and then use an "official" release. But it should work as is.