-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 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
30 changes: 30 additions & 0 deletions
30
common/src/test/kotlin/su/plo/voice/addon/logging/JavaLogger.kt
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,30 @@ | ||
package su.plo.voice.addon.logging | ||
|
||
import su.plo.slib.api.logging.McLogger | ||
import java.util.logging.Level | ||
import java.util.logging.Logger | ||
|
||
class JavaLogger( | ||
name: String | ||
) : Logger(name, null), McLogger { | ||
|
||
override fun trace(format: String, vararg arguments: Any?) { | ||
log(Level.FINEST, String.format(format, *arguments)) | ||
} | ||
|
||
override fun debug(format: String, vararg arguments: Any?) { | ||
log(Level.ALL, String.format(format, *arguments)) | ||
} | ||
|
||
override fun info(format: String, vararg arguments: Any?) { | ||
log(Level.INFO, String.format(format, *arguments)) | ||
} | ||
|
||
override fun warn(format: String, vararg arguments: Any?) { | ||
log(Level.WARNING, String.format(format, *arguments)) | ||
} | ||
|
||
override fun error(format: String, vararg arguments: Any?) { | ||
log(Level.SEVERE, String.format(format, *arguments)) | ||
} | ||
} |