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

CTL-841: Unable to change configuration of logger after initialization #836

Closed
GeertvanHorrik opened this Issue Feb 18, 2016 · 2 comments

Comments

Projects
None yet
1 participant
@GeertvanHorrik
Member

GeertvanHorrik commented Feb 18, 2016

Jira issue originally created by user menno:

The penultimate test fails

        [Test]
        public void TestMemoryLogger()
        {
            var listener = new RollingInMemoryLogListener
            {
                MaximumNumberOfLogEntries = 1000,
                IsErrorEnabled = true,
                IsWarningEnabled = false,
                IsInfoEnabled = false,
                IsDebugEnabled = false
            };
            bool received = false;
            listener.LogMessage += (o, a) =>
            {
                received = true;
            };
            LogManager.AddListener(listener);

            received = false;
            LogTo.Error("Error");
            Assert.That(received, Is.True);

            received = false;
            LogTo.Info("Info");
            Assert.That(received, Is.False);

            received = false;
            LogTo.Warning("Warning");
            Assert.That(received, Is.False);

            received = false;
            LogTo.Debug("Debug");
            Assert.That(received, Is.False);

            listener.IsWarningEnabled = true;
            listener.IsErrorEnabled = false;

            received = false;
            LogTo.Error("Error");
            Assert.That(received, Is.False);

            received = false;
            LogTo.Info("Info");
            Assert.That(received, Is.False);

            received = false;
            LogTo.Warning("Warning");
            Assert.That(received, Is.True);  // this fails

            received = false;
            LogTo.Debug("Debug");
            Assert.That(received, Is.False);
        }
@GeertvanHorrik

This comment has been minimized.

Show comment
Hide comment
@GeertvanHorrik

GeertvanHorrik Apr 29, 2017

Member

@mennodeij is this one still relevant?

Member

GeertvanHorrik commented Apr 29, 2017

@mennodeij is this one still relevant?

@GeertvanHorrik GeertvanHorrik removed this from the Up for grabs milestone Jan 25, 2018

@GeertvanHorrik

This comment has been minimized.

Show comment
Hide comment
@GeertvanHorrik

GeertvanHorrik Jan 25, 2018

Member

Closing since we got no response.

Member

GeertvanHorrik commented Jan 25, 2018

Closing since we got no response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment