-
Notifications
You must be signed in to change notification settings - Fork 770
[UR] added filename and line number to logs #17684
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
Conversation
Co-authored-by: Łukasz Ślusarczyk <[email protected]> Co-authored-by: Mateusz P. Nowak <[email protected]>
URLOG(ERR, "Not Implemented : {} - File : {} / Line : {}", __FUNCTION__, \ | ||
__FILE__, __LINE__); \ |
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.
If the idea is that URLOG
already includes the file name and line number, __FILE__
and __LINE__
should be removed here.
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.
Fixed
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 quite look right now, if __FILE__
and __LINE__
are removed without also updating the format string to match, this cannot work, can it?
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.
I think double FILE LINE is fine if one will set fileline:1, because
- default fileline is 0
- FILE from URLOG shortens path relatively to root, while FILE is a full path and one may want to 'grep' over each of them
- URLOG looks shorter in code and comply new standard of writing log statements
I would leave original code
URLOG(ERR, "Not Implemented : {} - File : {} / Line : {}", __FUNCTION__, \
__FILE__, __LINE__);
@hvdijk ,
do we agree on that?
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.
I disagree, File : {} / Line : {}
was added to address a deficiency in the available logging, now that the standard logging will have it, there is no longer a need for it. If we want the ability to log full paths (I'm not sure that we do), we should implement that in URLOG
, not work around it everywhere we use URLOG
.
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.
I see. OK. @mateuszpn , please just fix format string too (remove excesive {}
).
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.
Yes, that's what I meant, it was my mistake to keep the braces. I am now running additional tests to find more problems like this.
Done, please re-review |
@intel/bindless-images-reviewers please review |
@intel/llvm-gatekeepers , could you please merge this ? It seems this PR got finally last approvals needed. |
This has caused post commit linux build and windows build failures. @mateuszpn is aware and working on a fix. |
Fix of compilation errors caused by merge of #17684
Fix of compilation errors caused by merge of intel/llvm#17684
Fix of compilation errors caused by merge of intel/llvm#17684
Added an option to print line number and filename in log file. When
fileline:1
is specified in an environment variable describing log, e.g:then every log entry will have source file and line added, like below:
The significant changes are contained in the following files:
In the remaining files, the calls to the logger functions are replaced by macros (basically automatic change)