-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
base: logging enhancements: multiple debug output levels #243
base: master
Are you sure you want to change the base?
Conversation
3726e3d
to
36ac989
Compare
bc4ca8a
to
36a28c1
Compare
src/macports1.0/macports.tcl
Outdated
debug { | ||
if {[ui_isset ports_debug]} { | ||
return stderr | ||
} else { | ||
return {} | ||
} | ||
} | ||
debug[0-9] { |
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.
Internally, levels 0-9 supported. But range 0-3 enforced via argument checks, etc.
e78f220
to
99ca671
Compare
f06618a
to
b78b2cd
Compare
e97ada2
to
ac8e0e5
Compare
50ac08a
to
8af5ebd
Compare
Having 4 levels of debug seems a bit excessive to me. I would have thought that say 3 would easily be enough granularity? I also find having level ‘0’ called debug, whilst 1-3 called debugN a little confusing. I would personally suggest making debug and debug1 the same level (so just make debug an alias to debug1 for compatibility) and then have debug2 and debug3 for two increasingly more detailed levels. |
Sure, and three levels isn't set in stone; that was merely an arbitrary choice to start with. Overall, this effort is still evolving, and the goal is to support logging based on namespaces/packages - similar to Python and Java - to allow more control over output and levels. (Per recommendations by folks on the mailing list.) The latter hasn't been implemented yet, but watch this space. Further thoughts/comments/suggestions welcome! |
Relative to namespace/package logging, I'm currently evaluating the TCL If anyone has any experience with that package - or if there's a better option - please let me know! |
297ed4c
to
4b64623
Compare
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.
Seems OK to me, thanks for this.
src/pextlib1.0/tests/curl.tcl
Outdated
grepper $tempfile {gz_yes} | ||
# CNielsen: Temporarily disable compressed fetch, as failing after 30-second timeout | ||
#curl fetch --enable-compression https://www.whatsmyip.org/http-compression-test/ $tempfile | ||
#grepper $tempfile {gz_yes} |
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.
This doesn’t seem directly related to the debug level changes, or am I missing something ?
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.
This was necessary back a month or so ago, as the test consistently failed due to timeout. (It wasn't intended to be kept long-term though.)
Ultimately it will be reverted in this PR, or changed to use a different testing endpoint if necessary. (The latter would be based on guidance from Josh and/or Ryan.)
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.
hm, @jmroot @ryandesign any guidance?
4 levels is how many Fink has, IIRC... |
This PR has been changed to ready-for-review, with the caveat that merge conflicts need to be resolved. (Will try to get to that over the next few days.) Relative to namespace-scoped logging - something not currently included - I'm wondering if we should shelve that at this point? Reason being, we'd need to support a way to selectively set logging levels per-namespace. (Presumably via some type of config file, such as |
4b64623
to
0675a50
Compare
Yeah, probably worth saving that for a separate PR. |
Per recent discussion on the dev mailing list, implement support for multiple levels of debug logging support.
Link to discussion threads:
Corresponding work for macports-ports: PR 11184 - base support: logging enhancements: multiple debug output levels