-
-
Notifications
You must be signed in to change notification settings - Fork 19
Labels
Description
Log
class (introduced in Crystal version 0.34.0
) is a total rewrite of the old Logger
class (now deprecated) - which raven has supported by means of automagically recording logged messages as breadcrumbs - see:
raven.cr/src/raven/integrations/kernel/logger.cr
Lines 39 to 47 in 16d04fa
private def write(severity, datetime, progname, message) | |
record_breadcrumb( | |
severity, | |
datetime, | |
self.class.deansify(progname), | |
self.class.deansify(message), | |
) | |
previous_def | |
end |
This integration needs to be reworked now in order to support the new Log
class - preferably as a custom Log::Backend
.
Some of the things to keep in mind:
- Usage of
Logger#progname
needs to be changed to useLog#source
instead - Having
Raven::Logger
class might prove redundant - Having wildcard support for excluded source names (
db.*
) would be nice Raven::CrashHandler
needs to be updated accordingly- Old
Logger
breadcrumb integration would need to stay untilLogger
class is finally removed from Crystal's stdlib
Refs #64
sferik