collectiveaccess / providence

Cataloguing and data/media management application
GNU General Public License v3.0
299 stars 167 forks source link

Allow sending logging to stdout/stderr instead of app/log/... #923

Open raboof opened 3 years ago

raboof commented 3 years ago

When deploying providence in a container, it would be convenient if we could configure it to send logging to stdout/stderr instead of to log files in under app/log. This would allow whatever logging driver is configured for this container to pick up the logging (e.g. https://docs.docker.com/config/containers/logging/).

I see providence uses a pre-1.0.0 version of KLogger (https://github.com/katzgrau/KLogger) for the logging, which currently does not seem to make it easy to log to a single file rather than to a directory.

I see a couple of ways forward:

(this is not a high-priority issue for me, but it'd be nice to discuss the way forward a bit so when the time comes we know what to do ;) )

collectiveaccess commented 3 years ago

I believe that changing the logging library and standardizing how logging is done is the way to go. Currently, for historical reasons (don't ask) some logging is done by KLogger, some by Zend Logger and some into a database table (ca_eventlog) Cleaning up that (minor) mess would have to be part of this.