Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Log class #67

Closed
Sija opened this issue Jun 17, 2020 · 0 comments · Fixed by #68 or #69
Closed

Support Log class #67

Sija opened this issue Jun 17, 2020 · 0 comments · Fixed by #68 or #69

Comments

@Sija
Copy link
Owner

Sija commented Jun 17, 2020

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:

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 use Log#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 until Logger class is finally removed from Crystal's stdlib

Refs #64

@Sija Sija linked a pull request Jun 19, 2020 that will close this issue
@Sija Sija removed the help wanted label Jun 19, 2020
@Sija Sija mentioned this issue Jun 19, 2020
Merged
@Sija Sija closed this as completed in #69 Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant