-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Warning and logging tweaks #5894
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: bleeding-jumbo
Are you sure you want to change the base?
Warning and logging tweaks #5894
Conversation
|
I wasn't quite sure where to place WARN_ONCE macro. I put it in misc.h. |
adc9dc5 to
de6d9d7
Compare
|
I will revert the |
de6d9d7 to
04546d1
Compare
Did so now, and putc the newline to stream after the fprintf_color of the message. Also added much more (modes, formats). This PR can stay draft for a while, I'll add more of the same. |
4b0a926 to
f0a5684
Compare
67a894d to
08cdb1f
Compare
Add some function-like macros for log/warn/both WARN_AND_LOG() is like fprintf_color() then log_event(), with same message. WARN_ONCE() is like fprintf_color() but only once per session. LOG_ONCE() is like log_event() but only once per session. WARN_AND_LOG_ONCE() does both, with same message. Also add error color to error(), pexit() and similar stuff in misc.c
Also prefix log entries with "OpenCL:" for clarity.
08cdb1f to
908a43a
Compare
Adds color to many warning/errors. This includes shared stuff such as BENCH_CLERROR and error() so we get more visibility to many problems.
Adds shared macros LOG_ONCE, WARN_ONCE and WARN_LOG_ONCE.
Drops obsolete dead code.