Skip to content

Commit 46ddd00

Browse files
committed
addition archive serve logging
1 parent be4eda4 commit 46ddd00

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Tetrifact.Core/ProcessManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void AddUnique(ProcessCategories category, string key, string metadata)
9191
Category = category,
9292
Metadata = metadata });
9393

94-
_log.LogInformation($"Created process, category {category}, id {key}, no lifespan limit.");
94+
_log.LogInformation($"Created process, category {category}, id {key}, metadata {metadata}, no lifespan limit.");
9595
}
9696
}
9797

src/Tetrifact.Web/Controllers/ArchivesController.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ public ActionResult GetArchive(string packageId, [FromQuery(Name = "ticket")] st
121121
{
122122
if (string.IsNullOrEmpty(ticket))
123123
{
124-
_log.LogDebug($"Host is {headers.Host.Host}");
124+
_log.LogInformation($"Rejected download request because of missing ticket, origin is \"{host}\".");
125125
return Responses.NoTicket();
126126
}
127127

128128
// check for priority tickets
129129
if (_settings.DownloadQueuePriorityTickets.Contains(ticket))
130130
{
131-
_log.LogInformation($"Priority ticket {ticket} used from host {headers.Host}");
131+
_log.LogInformation($"Priority ticket {ticket} used from host \"{host}\".");
132132
ticketLog = $" priority ticket {ticket},";
133133
}
134134
else
@@ -171,6 +171,7 @@ public ActionResult GetArchive(string packageId, [FromQuery(Name = "ticket")] st
171171
if (!string.IsNullOrEmpty(ticket))
172172
_processManager.RemoveUnique(ticket);
173173
};
174+
174175
progressableStream.OnProgress = (long progress, long total) => {
175176
// keep ticket alive for duration of download
176177
if (!string.IsNullOrEmpty(ticket))

0 commit comments

Comments
 (0)