-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Removed old logging and implement Azure core logging coverage #18723
Conversation
@kushagraThapar , @moderakh , @simorenoh please take a look. |
@@ -133,11 +131,11 @@ export class DefaultQueryExecutionContext implements ExecutionContext { | |||
try { | |||
let p: Promise<Response<any>>; | |||
if (this.nextFetchFunction !== undefined) { | |||
log.debug("using prefetch"); | |||
logger.info("Debug: using prefetch"); |
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.
is it possible to only log certain log messages conditionally for debug level? meaning if the log level is not debug then we don't log certain messages?
doesn't azure logger have something like logger.debug
that we can use 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.
It's not there.
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.
let me check what others are doing.
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.
It's automatic...any logs that are written using a log level equal to or less than the one you choose will be emitted.
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.
ogs that are written using a log level equal to or less than the one you choose will be
most logging framework work that way. slf4j/log4j in java work same way.
@jay-most what are the supported log levels by the azure-logger?
logger.info is too noisy for this. Is there a lower log level (less noisy) which can be used 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.
... log level equal to or less than the one you choose will be emitted. sounds like it will be chatty at any level above debug.
error, warning, verbose, info
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.
thanks for explanation. In that case, if I understood correctly, it seems verbose is the closest to debug.
so as the old code was debug, isn't verbose more suitable here?
log.verbose("using prefetch");
I wonder if we can choose verbose here instead as it seems a more suitable replacement for debug?
79a6b01
to
03fd604
Compare
03fd604
to
7f81c24
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.
one minor comment regarding mapping of the old log levels to the new log levels. other than that LGTM. Thanks.
I think we should go with this:
debug -> verbose
info -> info
warn -> warning
error -> error
e046ef7
to
93cef79
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.
Mo made a good point and seems like it's been fixed, lgtm!
-ClientContext logging
-ParallelQueryExecutionContextBase logging
-RequestHandler logging