-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
Nicer logging for debugging #282
Conversation
@@ -573,5 +574,36 @@ def future(meth = nil, *args, &block) | |||
# Configure default systemwide settings | |||
Celluloid.task_class = Celluloid::TaskFiber | |||
Celluloid.logger = Logger.new(STDERR) | |||
Celluloid.logger.formatter = Celluloid::Logger::FORMATTER = proc do |severity, datetime, progname, msg| | |||
thread = Thread.current | |||
id = " " * 36 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allocation is unnecessary....
@tarcieri this is conceptually here, but I want to move the debug info onto the respective objects to avoid infinite string allocation for each logger call. |
@e2 is this mergeable now you think? Since 2013 it seems there has been BSD progress. @halorgium would you mind looking at this and your stale branches for |
I saw this PR years ago. Celluloid needs a better debugging framework, but I'm sure that would hurt performance too much - because the areas you'd want the information are pretty critical, and the log files aren't really useful any more (too much stuff going on in there). It's partially why I suggested: #548. The best solution is to probably set Celluloid up so it can traces externally (without a performance hit). Kind of like a strace(). This probably needs a separate issue though. |
This is woefully out of date. Closing. |
It is almost impossible to determine where logs after coming from unless you add metadata yourself.
We have this information inside the system, so this exposes that outward.
Quite verbose, but useful.