-
Notifications
You must be signed in to change notification settings - Fork 44
System logging pipeline #239
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
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. Mostly looks good. lets discuss with @mhoeger if call back to log system logs within the context for invocation makes sense or not.
src/Context.ts
Outdated
if (done) { | ||
let badAsyncMsg = "Warning: Unexpected call to 'log' on the context object after function execution has completed. Please check for asynchronous calls that are not awaited or calls to 'done' made before function execution completes. "; | ||
badAsyncMsg += `Function name: ${executionContext.functionName}. Invocation Id: ${executionContext.invocationId}. `; | ||
badAsyncMsg += `Learn more: https://go.microsoft.com/fwlink/?linkid=2097909 `; | ||
log(LogLevel.Warning, badAsyncMsg); | ||
systemWarn(badAsyncMsg); | ||
systemLog(SystemLogLevel.Warning, executionContext.functionName, executionContext.invocationId, badAsyncMsg); |
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.
With in the execution context, we should not be logging system logs
3b6fbab
to
1cd39ed
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.
a few changes where we should be using systemLog or systemWarn. Also, do you mind adding a comment in utils/Logger that we only want to system log if we need to guarantee the message will make it / don't care about performance (ex: process is exiting)?
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
awesome, thanks for this!
272f94f
to
f250295
Compare
Part of work for Azure/azure-functions-host#3117