The Wayback Machine - https://web.archive.org/web/20210629221932/https://github.com/dotnet/aspnetcore/issues/33945
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

W3CLogger follow-ups #33945

Open
4 tasks
wtgodbe opened this issue Jun 29, 2021 · 1 comment
Open
4 tasks

W3CLogger follow-ups #33945

wtgodbe opened this issue Jun 29, 2021 · 1 comment
Assignees
Milestone

Comments

@wtgodbe
Copy link
Task lists! Give feedback
Member

@wtgodbe wtgodbe commented Jun 29, 2021

  • Resolve W3CLoggerProcessor from DI in W3CLogger.cs:

    private readonly W3CLoggerProcessor _messageQueue;
    private readonly IOptionsMonitor<W3CLoggerOptions> _options;
    private W3CLoggingFields _loggingFields;
    public W3CLogger(IOptionsMonitor<W3CLoggerOptions> options, IHostEnvironment environment, ILoggerFactory factory)
    {
    _options = options;
    _loggingFields = _options.CurrentValue.LoggingFields;
    _options.OnChange(options =>
    {
    _loggingFields = options.LoggingFields;
    });
    _messageQueue = InitializeMessageQueue(_options, environment, factory);

    #33251

  • Avoid using int.ToString:

    if (options.LoggingFields.HasFlag(W3CLoggingFields.ProtocolStatus))
    {
    shouldLog |= AddToList(elements, _protocolStatusIndex, response.StatusCode.ToString(CultureInfo.InvariantCulture));
    }

    #33251

  • Helper method for finding file names in FileLoggerProcessorTests:

    fileName1 = Path.Combine(path, FormattableString.Invariant($"{options.FileName}{now.Year:0000}{now.Month:00}{now.Day:00}.0000.txt"));
    fileName2 = Path.Combine(path, FormattableString.Invariant($"{options.FileName}{now.Year:0000}{now.Month:00}{now.Day:00}.0001.txt"));

    #33251

  • Mock SystemClock so tests can test behavior when rolling to a new day (i.e. file number suffix goes back to 0):
    https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/common/Shared/ISystemClock.cs

@wtgodbe wtgodbe added this to the Backlog milestone Jun 29, 2021
@wtgodbe wtgodbe self-assigned this Jun 29, 2021
@msftbot
Copy link
Contributor

@msftbot msftbot bot commented Jun 29, 2021

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant