Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

The Loggly sink automatically change the LogLevel when the LogLevelSwitching is active. #32

Open
moattarwork opened this issue Jan 10, 2018 · 1 comment
Labels

Comments

@moattarwork
Copy link

moattarwork commented Jan 10, 2018

The Loggly sink automatically change the LogLevelSwich to the debug. It should be updated from Loggly and if the feature is not possible it shouldn't change the value at all.

Here is the related code from HttpLogShipper

        async Task OnTick()
        {
            LogEventLevel? minimumAcceptedLevel = LogEventLevel.Debug;

            try
            {
              ...........
            }
            catch (Exception ex)
            {
                SelfLog.WriteLine("Exception while emitting periodic batch from {0}: {1}", this, ex);
                _connectionSchedule.MarkFailure();
            }
            finally
            {
                lock (_stateLock)
                {
                    _controlledSwitch.Update(minimumAcceptedLevel);

                    if (!_unloading)
                        SetTimer();
                }
            }
        }
@MiguelAlho
Copy link
Contributor

Thanks. This code was originally in the Seq Sink and has changed (datalust/serilog-sinks-seq@9a2a8d5).

I'll look into it.

@MiguelAlho MiguelAlho added the bug label Jan 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants