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

Syslog Support #21

Merged
merged 1 commit into from
Jan 18, 2016
Merged

Syslog Support #21

merged 1 commit into from
Jan 18, 2016

Conversation

sbchisholm
Copy link
Collaborator

  • Adds support for multiple logging output.
  • Configure log level via string (i.e.: "INFO" or "DEBUG" etc.).
  • NOTE: Breaks the log level numbers (the log level enum is now in line with syslog).


if VERSION < v"0.4.0-dev+3587"
include("enum.jl")
end

@enum LogLevel DEBUG INFO WARNING ERROR CRITICAL OFF
@enum LogLevel OFF=-1 CRITICAL=2 ERROR WARNING INFO=6 DEBUG
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is better, and even though breaking, probably okay, as long as no one was depending on the order outside of this module. Will probably do a minor version bump.

@kmsquire
Copy link
Owner

kmsquire commented Aug 6, 2015

Looks really good--thanks!

@sbchisholm
Copy link
Collaborator Author

Thanks for the feedback. It's also worth noting this only adds support for logging to syslog via UDP. Syslog also supports logging to a local socket and over TCP (something to look into adding in the future).

@sbchisholm sbchisholm force-pushed the syslog-support branch 2 times, most recently from f8ce4a6 to ff675cf Compare November 17, 2015 15:55
@sbchisholm
Copy link
Collaborator Author

@kmsquire I recently updated this PR, fixed a few julia 0.4 deprecation warnings and added a max message length attribute to the SysLog type, this allows you to truncate log messages. I was finding that my application was crashing on some large debug messages when trying to send them over the UDPSocket.

@DanielArndt
Copy link
Collaborator

@kmsquire Any plans to merge this in?

We're going to be keeping a fork at https://github.com/analyzere/Logging.jl so I have a vested interest in preventing these two from diverging too much :)

kmsquire added a commit that referenced this pull request Jan 18, 2016
@kmsquire kmsquire merged commit 9a98f46 into kmsquire:master Jan 18, 2016
@kmsquire
Copy link
Owner

Thanks for the bump. I've been working my way through issues in other packages, and haven't spent a lot of love here.

@DanielArndt
Copy link
Collaborator

No problem, I've seen the other things you've been doing, you're very busy. Thanks!

@kmsquire
Copy link
Owner

@sbchisholm @DanielArndt I've added you both as collaborators here, so if there other things that you see that need attention, I'd love the help.

My hopes/plans:

  1. move this repo to JuliaLang
  2. integrate the basic framework into Julia itself, and have this package and/or others just provide extra features. (Basic logging in Base JuliaLang/julia#13515)
  3. borrow ideas/code from LumberJack.jl (which is probably pretty good, but I can't get myself past the naming scheme)

It seems that people use this package, so I think the first item is reasonable so that at least more people have access to fix things. That said, just moving it to JuliaLang doesn't guarantee that.

For the others, I don't know if/when I will find the time. Like a lot of people, I'm a volunteer here, and my availability ebbs and flows. I'm also about to become a first-time father, so I should probably take care of at least the first item pretty soon... ;-)

@DanielArndt DanielArndt deleted the syslog-support branch February 23, 2016 16:06
r9y9 added a commit to r9y9/Logging.jl that referenced this pull request Mar 21, 2016
kmsquire added a commit that referenced this pull request Mar 30, 2016
Fix log-level bug introduced by #21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants