Closed Blacksmoke16 closed 5 years ago
After some additional thought here is the current plan:
athena.yml
config file.
HTTP::Handler
, but for logging.
STDOUT
in develop mode, and corresponding file in dev/prod mode.log
method, and to allow standard .info
etc to accept context
, which would be a hash of data that would be passed along.
Basically modeling this off of monolog.
Logger
class, based (roughly?) on RFC5424
processor
- allows adding additional data to the log recordhandler
- writes/sends the log record somewhere (basically just a class that implements a write
method)
formatter
- changes the output style of a handlerAthena.logger
would be the default, but Athena.logger("foo")
would use a logger registered with the name "foo"
. This would allow different customizable "pipelines" each with their own, or shared, set of handlers, formatters, and processors.This will be fixed via an implementation of Crylog once I get things fledged out a bit more.
Currently Athena does not log incoming requests, non handled errors that happened (500s that otherwise are just swallowed), etc.
Ideally these should be logged to a file, and optionally STDOUT (if in development env) in some standardized way so that the developer could see whats wrong, but user would not get any insight to the issue. Could utilize
IO::MultiWriter
for this, possibly also some configuration via the config file?The format should be configurable, probably using a
Logger.formatter
override.Some way to rotate the log files?