cul-it / archival-storage-ingest

Automated ingest application for CULAR archival storage
1 stars 0 forks source link

Logging with systemd #14

Open bb233 opened 5 years ago

bb233 commented 5 years ago

Currently, the servers handle their own logging -- they are each configured in Ruby code to write to individual log files.

The guidance for "12 factor apps" at https://12factor.net/ recommend having services logging to stdin/stdout, and letting systemd (or equivalent) handle log routing, persistence, etc.

Adapting this recommendation would mainly involve changing how we configure the logger in the application and removing the file configuration from our startup scripts. By default systemd records the stdout/stderr logged events using journald, so the logs can be accessed and managed with journald automatically.

I am planning on working on improving our logging (to log more events, and more details on failure). That would be an opportunity to make these changes.