AppSecretFile: pin the deprecation at Warning level, say trailing newlines
Soul pass on 25b9cc16: the warning level was unpinned (a Trace demotion passed) and the docs said one newline where the code trims all.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
25b9cc1683
commit
280d843aeb
4 changed files with 24 additions and 6 deletions
|
|
@ -5,6 +5,19 @@ namespace Bifrost.Web.Tests.Support;
|
|||
public sealed class CapturingLoggerProvider : ILoggerProvider
|
||||
{
|
||||
private readonly List<string> _lines = [];
|
||||
private readonly List<string> _warnings = [];
|
||||
|
||||
/// <summary>Lines logged at Warning or above, to pin that an operator-facing notice reaches the journal.</summary>
|
||||
public IReadOnlyList<string> WarningLines
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (_lines)
|
||||
{
|
||||
return _warnings.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IReadOnlyList<string> Lines
|
||||
{
|
||||
|
|
@ -38,7 +51,12 @@ public sealed class CapturingLoggerProvider : ILoggerProvider
|
|||
{
|
||||
lock (owner._lines)
|
||||
{
|
||||
owner._lines.Add(formatter(state, exception) + (exception is null ? string.Empty : "\n" + exception));
|
||||
var line = formatter(state, exception) + (exception is null ? string.Empty : "\n" + exception);
|
||||
owner._lines.Add(line);
|
||||
if (logLevel >= LogLevel.Warning)
|
||||
{
|
||||
owner._warnings.Add(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue