-
Notifications
You must be signed in to change notification settings - Fork 11
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
Server#default_logger doesn't play with Server#simple! #32
Comments
Can you give an example of when the service settings would change after the server is initialized? I'm having trouble understanding the problem. |
Sorry, just seeing that now. What if the logger were configurable either (a) through settings file or (b) from command line options or (c) through runner methods? Rather than a completely separate route into the server via the constructor. |
@ericgj: That seems okay to me, but it's not clear to me how it'd look. Can you sketch something up? (non-implemented sketches of the API are OK) |
Well, the distinctions between the settings and the runner file and the command line are a bit hazy to me now. Maybe some settings.service.* settings should be in runner file now? Anyway, maybe there should be a separate set of settings for the logger, (which maybe can be overrode in the runner or command-line), like
then in the server,
|
Hmm... I suppose at this point there is little distinction between the settings file and the runner file and it may be worth combining them somehow. However, I would want to be careful to make sure that it wasn't required to use the I like the idea of introducing settings.logger, but I'm not that Your Thanks for the ideas... I'll sleep on this and see what I can come up with. |
See #31. Basically, default_logger caches the logger object as soon as Server object is initialized, preventing a change made to the debug_mode settings from taking effect if it is made after the object was created but before a tick or run call is made. I could easily move the logger caching code into tick (and it'd be a no-op on subsequent ticks), but that feels nasty. @brentvatne, @ericgj, thoughts?
The text was updated successfully, but these errors were encountered: