-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- The SimpleLogger class now handles all logs - SimpleLogger uses fansi to use colors for different log levels - Logs go to the stderr instead of stdout
- Loading branch information
Showing
4 changed files
with
43 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/scala/net/wiringbits/myphototimeline/SimpleLogger.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package net.wiringbits.myphototimeline | ||
|
||
class SimpleLogger { | ||
|
||
def info(msg: String): Unit = { | ||
System.err.println(msg) | ||
} | ||
|
||
def warn(msg: String): Unit = { | ||
System.err.println(s"${fansi.Color.Yellow("WARNING")}: $msg") | ||
} | ||
|
||
def fatal(msg: String): Unit = { | ||
System.err.println(s"${fansi.Color.Red("FATAL")}: $msg") | ||
} | ||
} |