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

Better logging #490

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class ErrorResultFilter(ILoggerFactory loggerFactory) : IAlwaysRunResultF

public void OnResultExecuted(ResultExecutedContext context)
{
if (context.HttpContext.Response.StatusCode >= 400)
if (context.HttpContext.Response.StatusCode >= 500)
{
_logger.LogInformation(
"Client {client} made request:\n {request}.\n Serval responded with code {statusCode}. Trace: {activityId}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,12 @@ CancellationToken cancellationToken
);
if (usfm == "")
return NoContent();
_logger.LogInformation("Returning USFM for {TextId} in {CorpusId} of {EngineId}", textId, corpusId, id);
_logger.LogInformation(
"Returning USFM for {TextId} in engine {EngineId} for corpus {corpusId}",
textId,
id,
corpusId
);
return Content(usfm, "text/plain");
}

Expand Down
Loading