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

Fixes -error not suppressing startup logs #4036

Merged
merged 1 commit into from Mar 26, 2018

Conversation

Projects
None yet
3 participants
@eed3si9n
Copy link
Member

commented Mar 25, 2018

Fixes #3849

This brings back the 0.13 logic:

  def setGlobalLogLevel(s: State, level: Level.Value): State = {
    s.globalLogging.full match {
      case a: AbstractLogger => a.setLevel(level)
      case _                 => ()
    }
    s.put(BasicKeys.explicitGlobalLogLevels, true).put(Keys.logLevel.key, level)
  }
Fixes -error not suppressing startup logs
Fixes #3849

This brings back the 0.13 logic:

```scala
  def setGlobalLogLevel(s: State, level: Level.Value): State = {
    s.globalLogging.full match {
      case a: AbstractLogger => a.setLevel(level)
      case _                 => ()
    }
    s.put(BasicKeys.explicitGlobalLogLevels, true).put(Keys.logLevel.key, level)
  }
```
@dwijnand
Copy link
Member

left a comment

is this just an idea, or was it manually tested to fixed the issue?

@@ -229,8 +229,13 @@ object LogManager {
// s
// }

This comment has been minimized.

Copy link
@dwijnand

dwijnand Mar 26, 2018

Member

is this commented block relevant to this?

This comment has been minimized.

Copy link
@veera83372

veera83372 Mar 26, 2018

Member

I think so.It is useful when you use abstract logger type but now those are managed loggers.

This comment has been minimized.

Copy link
@eed3si9n

eed3si9n Mar 26, 2018

Author Member

Not particularly to this bug. The commented out code provides fallback to the project scoping when global settings are NOT available.

   // if global logging levels are not explicitly set, set them from project settings
@eed3si9n

This comment has been minimized.

Copy link
Member Author

commented Mar 26, 2018

is this just an idea, or was it manually tested to fixed the issue?

Manually tested and confirmed.

@dwijnand dwijnand added this to the 1.1.2 milestone Mar 26, 2018

@dwijnand
Copy link
Member

left a comment

let's go!

@dwijnand dwijnand merged commit b0f9fe7 into sbt:1.1.x Mar 26, 2018

3 checks passed

Codacy/PR Quality Review Good work! A positive pull request.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@dwijnand dwijnand removed the in progress label Mar 26, 2018

@eed3si9n eed3si9n deleted the eed3si9n:wip/fix-startup-log branch Mar 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.