Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Library appears to initialize and clean up when not explicitly instantiated #94

Closed
tboyko opened this Issue · 6 comments

3 participants

@tboyko

A simple script like this:

require 'celluloid'

outputs the following upon execution/exit:

I, [2012-09-20T11:34:13.727047 #13173]  INFO -- : Terminating 2 actors...
I, [2012-09-20T11:34:13.727431 #13173]  INFO -- : Shutdown completed cleanly

Shouldn't requiring a library be a fairly passive action, meaning that nothing should be initialized or cleaned up unless an object is created from that library?

@tarcieri
Owner

I could try to separate Celluloid initialization so it occurs somewhat lazily, but that's actually quite difficult and something I'm not really interested in doing in the near future. Put it on your post-Celluloid 1.0 wish list.

You're not the first person to complain about this, but I'm calling it "won't fix" at least for now. I definitely prefer having the logger automatically activate.

@tarcieri tarcieri closed this
@manuelmeurer

I'm seeing this as well after adding a library that uses Celluloid to my app (Sidekiq). Now I get emails for every Cron job that runs on my server, even if the job itself does not output anything, the "Terminating..." message is always printed out. Very annoying! Can I silence Celluloid somehow?

@tarcieri
Owner

See #112. Also 04f2820 moves those messages to the debug loglevel, so you should be able to adjust the logging severity if you so desire.

And as always, you can redirect the log to a logfile by setting Celluloid.logger to something else (e.g. nil)

@manuelmeurer

Great! Could you release a new gem version with 04f2820?

@tboyko

I second @manuelmeurer's request. Please release a new gem including this change!

@tarcieri
Owner

There's some other stuff I need to finish up before the next release. This is coming soon, though! ;)

@Soliah Soliah referenced this issue in mperham/sidekiq
Closed

Shutdown completed cleanly messages #975

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.