diff options
| author | Jiuyang Liu | 2021-11-30 08:54:07 +0800 |
|---|---|---|
| committer | GitHub | 2021-11-29 16:54:07 -0800 |
| commit | b7dd35e9cdeecb2d5125ef1d8802d5af17bff4ab (patch) | |
| tree | 2220995b3a36df4b0b8ee18185cb75414ba48d5b /src/test/scala/loggertests | |
| parent | 82da33135fcac1a81e8ea95f47626e80b4e80fd1 (diff) | |
[deprecation clean up] remove firrtl.ExecutionOptionsManager (#2422)
Also remove all related APIs:
ComposableOptions
HasParser
CommonOptions
HasCommonOptions
FirrtlExecutionOptions
HasFirrtlOptions
FirrtlExecutionResult
FirrtlExecutionSuccess
FirrtlExecutionFailure
ExecutionOptionsManager
firrtl.stage.DriverCompatibility.firrtlResultView
logger.Logger.makeScope
OutputConfig
SingleFile
OneFilePerModule
* Change default LogLevel to None which means "unset"
Logger.getGlobalLevel then returns LogLevel.Warn when the current value
is LogLevel.None. This preserves the behavior of the default being
"Warn" but now uses LogLevel.None to indicate "I'm not setting the
value." This resolves issues where it was not possible to tell if
annotations were actually setting the log level or if the default level
of warn was just being filled in.
Co-authored-by: sinofp <sinofp@tuta.io>
Co-authored-by: Jack Koenig <koenig@sifive.com>
Diffstat (limited to 'src/test/scala/loggertests')
| -rw-r--r-- | src/test/scala/loggertests/LoggerSpec.scala | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/test/scala/loggertests/LoggerSpec.scala b/src/test/scala/loggertests/LoggerSpec.scala index d9feb931..e0a7b43d 100644 --- a/src/test/scala/loggertests/LoggerSpec.scala +++ b/src/test/scala/loggertests/LoggerSpec.scala @@ -41,7 +41,7 @@ class LoggerSpec extends AnyFreeSpec with Matchers with OneInstancePerTest with "Logger is a simple but powerful logging system" - { "Following tests show how global level can control logging" - { - "setting level to None will result in only error messages" in { + "setting level to None will result in warn messages" in { Logger.makeScope() { val captor = new OutputCaptor Logger.setOutput(captor.printStream) @@ -52,7 +52,7 @@ class LoggerSpec extends AnyFreeSpec with Matchers with OneInstancePerTest with val messagesLogged = captor.getOutputAsString messagesLogged.contains(LoggerSpec.ErrorMsg) should be(true) - messagesLogged.contains(LoggerSpec.WarnMsg) should be(false) + messagesLogged.contains(LoggerSpec.WarnMsg) should be(true) messagesLogged.contains(LoggerSpec.InfoMsg) should be(false) messagesLogged.contains(LoggerSpec.DebugMsg) should be(false) messagesLogged.contains(LoggerSpec.TraceMsg) should be(false) @@ -274,22 +274,6 @@ class LoggerSpec extends AnyFreeSpec with Matchers with OneInstancePerTest with messagesLogged.contains("logger3") should be(true) } } - "Show logging can be set with command options" in { - val captor = new Logger.OutputCaptor - - Logger.makeScope(Array("--class-log-level", "loggertests.LogsInfo3:info")) { - Logger.setOutput(captor.printStream) - val r2 = new LogsInfo2 - val r3 = new LogsInfo3 - r2.run() - r3.run() - - val messagesLogged = captor.getOutputAsString - - messagesLogged.contains("logger2") should be(false) - messagesLogged.contains("logger3") should be(true) - } - } "Show that printstream remains across makeScopes" in { Logger.makeScope() { val captor = new Logger.OutputCaptor |
