Skip to content
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

log correlation not included in logs #408

Open
srkirkland opened this issue Jan 19, 2024 · 1 comment
Open

log correlation not included in logs #408

srkirkland opened this issue Jan 19, 2024 · 1 comment

Comments

@srkirkland
Copy link
Member

at least with stackify it doesn't seem the correlationID is included when logging. GS uses a very different type of enricher instead of the middleware used here, and it appears to work, so possibly look into that strategy.

@jSylvestre
Copy link
Member

This is the way I linked them in here, not sure if that would work with the correlation id
var innerLog = log.ForContext("journalRequestId", journalRequest.RequestId);
innerLog.Warning("journalResult {journalResult}", JsonConvert.SerializeObject(result.GlJournalRequest));
foreach (var err in result.GlJournalRequest.ValidationResults.ErrorMessages)
{
innerLog.Warning("Transaction {TransactionId} rejected: {Message}",
transaction.Id, err);
}

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

No branches or pull requests

2 participants