Skip to content

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

Merged
merged 1 commit into from
Sep 20, 2019
Merged

System logging pipeline #239

merged 1 commit into from
Sep 20, 2019

Conversation

yojagad
Copy link
Contributor

@yojagad yojagad commented Aug 9, 2019

@yojagad yojagad requested review from pragnagopa and mhoeger August 9, 2019 23:58
@pragnagopa pragnagopa changed the title System logging pipeline [Do not mege until proto updates are pulled in]System logging pipeline Aug 18, 2019
Copy link
Member

@pragnagopa pragnagopa left a 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);
Copy link
Member

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

Copy link
Contributor

@mhoeger mhoeger left a 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)?

@yojagad
Copy link
Contributor Author

yojagad commented Sep 19, 2019

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yojagad yojagad changed the title [Do not mege until proto updates are pulled in]System logging pipeline System logging pipeline Sep 20, 2019
Copy link
Contributor

@mhoeger mhoeger left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants