Browse Source

log api requests (#2404)

pull/2406/head
Jason Dove 11 months ago committed by GitHub
parent
commit
bd6954121f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 2
      ErsatzTV.Core/Scheduling/ScriptedScheduling/ScriptedPlayoutBuilder.cs
  3. 7
      ErsatzTV/Startup.cs

1
CHANGELOG.md

@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- A batch size can be set to limit the number of items to schedule from each group at a time
- Empty or zero batch size means play all items from each group before advancing
- Any other value means play the specified number of items before advancing to the next group
- Log API requests when `Request Logging Minimum Log Level` is set to `Debug`
### Fixed
- Fix transcoding content with bt709/pc color metadata

2
ErsatzTV.Core/Scheduling/ScriptedScheduling/ScriptedPlayoutBuilder.cs

@ -82,7 +82,7 @@ public class ScriptedPlayoutBuilder( @@ -82,7 +82,7 @@ public class ScriptedPlayoutBuilder(
var commandResult = await command.ExecuteBufferedAsync(linkedCts.Token);
if (!string.IsNullOrWhiteSpace(commandResult.StandardOutput))
{
Console.WriteLine(commandResult.StandardOutput);
logger.LogDebug("Scripted playout output: {Output}", commandResult.StandardOutput);
}
if (commandResult.ExitCode != 0)

7
ErsatzTV/Startup.cs

@ -536,6 +536,13 @@ public class Startup @@ -536,6 +536,13 @@ public class Startup
return LogEventLevel.Debug;
}
if (httpContext.Request.Path.ToUriComponent().StartsWith(
"/api",
StringComparison.OrdinalIgnoreCase))
{
return LogEventLevel.Debug;
}
return LogEventLevel.Verbose;
};

Loading…
Cancel
Save