Skip to content

integrated-application-development/sbt-log-level

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Description

Sample project to illustrate an issue with log levels in commands. This project defines an sbt command logThenFail which makes 3 log entries using the logger state.log then throws a MessageOnlyException to fail the command.

Problem

Log entries created from a command does not seem to display correctly in warn or error levels.

  • Logging made from state.log does not show up in any warn and error log levels.
  • error log from throwing MessageOnlyException also does not show up in warn and error log levels.

This is confusing to users, especially in the case of throwing MessageOnlyException to fail the command and the build.

$ sbt logThenFail
[info] welcome to sbt 1.10.6 (Eclipse Adoptium Java 17.0.12)
[info] loading project definition from path\to\sbt-log-level\project
[info] loading settings for project log-level from build.sbt...
[info] set current project to log-level (in build file:/path/to/sbt-log-level/)
[info] Some info
[warn] Some warnings
[error] Some errors
[error] Terminating error
# expect the warnings and errors to show up but empty
$ sbt --warn logThenFail

# expect the errors to show up but empty
$ sbt --error logThenFail

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages