Skip to content

Exceptions should be logged (to standard logfiles) #10

@stianstr

Description

@stianstr

The devices and daemons each have their own log file. These contain everything that is logged using log-functions in chains.common.log. But uncaught exceptions are printed to stderr (or stdout?) by Python and hence are not logged to the standard logfiles.

Note however that for the docker-versions, supervisor catches stdout and stderr, and these exceptions can be found in /var/log/chains/supervisor. (For devices the relevant logfile is manager.log).

It would be nice if exceptions too were logged to the standard logfiles.

I can think of two ways to do this:

  1. Catch unhandled exceptions somewhere, and log them before letting them propagate. Though, I'm unsure how smooth this will work when dealing with threads.
  2. Let chains.common.log output to stdout instead of file, and let it be the daemon-starter's job to pipe til to the relevant file (ie. manager's job for the devices, and supervisor's job for the other daemons).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions