-
Notifications
You must be signed in to change notification settings - Fork 24
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
All front-end debugging messages suppressed by early initial message #55
Comments
Can we just move the SPINDLE_DEBUG environment variable setting to the top of sp_init(), so it's before any spindle calls? |
Well, that'll work until some newbie adds code to the top of every function to generate a call tree... We'd also have to make
|
Calls to
spindle_debug_printf_impl()
(usually via a wrapper) will trigger logger initialization viainit_spindle_debugging()
as needed. Correct initialization requires theSPINDLE_DEBUG
environment variable to be already set. However, this does not happen until several lines intosp_init()
(when running under Flux).When that environment variable is not yet set, the initialization process assumes the absence of the variable is intentional and short-circuits further attempts at initialization.
A possible two-part fix:
Force
sp_init()
to always set SPINDLE_DEBUG in the shell environment, setting it to zero if the variable was not present in the flux shell environment. Forceinit_spindle_debugging()
to check for the existence ofSPINDLE_DEBUG
. If the variable is not present, take that as an indication that shell initialization isn't yet complete. The message should probably be logged regardless of log level; alternatively, it could be buffered and logged later, but that gets complicated quickly. Subsequent calls tospindle_debug_printf_impl()
can check if the environment variable has been set yet, and reset initialization if needed.The text was updated successfully, but these errors were encountered: