aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2021-10-27 19:40:35 -0600
committerCody Robibero <cody@robibe.ro>2021-10-27 19:40:35 -0600
commit91204fc9f0e704a61300a7bd54f52d56f02f44b3 (patch)
treefc92dd80b46131cdffa668768eb3dcb63822f44b
parentc534c450330759f6595c9601e3fe8b12e6987e69 (diff)
Fix logfile name if api key is used
-rw-r--r--MediaBrowser.Controller/ClientEvent/ClientEventLogger.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/ClientEvent/ClientEventLogger.cs b/MediaBrowser.Controller/ClientEvent/ClientEventLogger.cs
index 61f7adff3..04d0a3c43 100644
--- a/MediaBrowser.Controller/ClientEvent/ClientEventLogger.cs
+++ b/MediaBrowser.Controller/ClientEvent/ClientEventLogger.cs
@@ -46,7 +46,7 @@ namespace MediaBrowser.Controller.ClientEvent
/// <inheritdoc />
public async Task WriteDocumentAsync(AuthorizationInfo authorizationInfo, Stream fileContents)
{
- var fileName = $"upload_{authorizationInfo.Client}_{authorizationInfo.Version}_{DateTime.UtcNow:yyyyMMddHHmmss}.log";
+ var fileName = $"upload_{authorizationInfo.Client}_{(authorizationInfo.IsApiKey ? "apikey" : authorizationInfo.Version)}_{DateTime.UtcNow:yyyyMMddHHmmss}.log";
var logFilePath = Path.Combine(_applicationPaths.LogDirectoryPath, fileName);
await using var fileStream = new FileStream(logFilePath, FileMode.CreateNew, FileAccess.Write, FileShare.None);
await fileContents.CopyToAsync(fileStream).ConfigureAwait(false);