Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Increase debug-level logging in Fenzo's scheduler #59

Closed
dgrnbrg opened this issue Nov 10, 2015 · 10 comments
Closed

Increase debug-level logging in Fenzo's scheduler #59

dgrnbrg opened this issue Nov 10, 2015 · 10 comments
Assignees

Comments

@dgrnbrg
Copy link

dgrnbrg commented Nov 10, 2015

Currently, I am trying to debug an issue where I provide with one task and one lease to schedule, and fenzo says that it has zero successful or failed assignments. I'm trying to debug this, but since there's no debug logging available, it's tricky to trace what's going on.

@spodila
Copy link
Contributor

spodila commented Nov 10, 2015

@dgrnbrg Will do. For immediate help, you could try to debug using this call:
http://netflix.github.io/Fenzo/fenzo-core/com/netflix/fenzo/TaskScheduler.html#getResourceStatus--

@spodila spodila self-assigned this Nov 10, 2015
@spodila
Copy link
Contributor

spodila commented Nov 11, 2015

You can now use the optional builder method, withDebugEnabled(), to enable additional debugging info. Note that turning this on can print numerous log messages per invocation of scheduleOnce() method, as well as have a performance overhead.
This is in Fenzo 0.8.2.

@dgrnbrg
Copy link
Author

dgrnbrg commented Nov 11, 2015

What log namespaces and levels does it use?

Also, why not use the slf4j compatible log levels for enabling/disabling debugging info?

@spodila
Copy link
Contributor

spodila commented Nov 11, 2015

There would be a performance hit by creating the log strings and invoking logger.debug() even if debug is turned off. Therefore, we pick this approach of defining the flag to turn on additional debug info when creating the task scheduler.

@dgrnbrg
Copy link
Author

dgrnbrg commented Nov 11, 2015

Depending on the amount of logging, another approach I've seen is to create the log strings inside an if-statement gated by isXXXEnabled(), where XXX is Debug, Info, etc.

The reason I bring this up is that it's very convenient having logging entirely managed through the logging framework, when it comes to temporarily enabling different log levels through a standard config file, or even while the system is running. We sometimes do this in the application I'm using Fenzo in, Cook, since it's made of quite a few major, complex libraries.

@aspyker
Copy link
Contributor

aspyker commented Nov 14, 2015

Fixed via #64

@spodila
Copy link
Contributor

spodila commented Nov 14, 2015

Awesome, thanks @aspyker

@dgrnbrg
Copy link
Author

dgrnbrg commented Nov 16, 2015

Yes, thank you!
On Fri, Nov 13, 2015 at 9:16 PM spodila notifications@github.com wrote:

Awesome, thanks @aspyker https://github.com/aspyker


Reply to this email directly or view it on GitHub
#59 (comment).

@spodila
Copy link
Contributor

spodila commented Nov 16, 2015

0.8.4 has these changes. JavaDocs are updates as well.

@spodila
Copy link
Contributor

spodila commented Jan 28, 2016

Closing this issue since it has been addressed already.

@spodila spodila closed this as completed Jan 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants