generated from GoodforGod/java-library-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from GoodforGod/dev
[0.13.0]
- Loading branch information
Showing
10 changed files
with
579 additions
and
295 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
27 changes: 27 additions & 0 deletions
27
src/main/java/io/goodforgod/slf4j/simplelogger/Layout.java
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,27 @@ | ||
package io.goodforgod.slf4j.simplelogger; | ||
|
||
/** | ||
* Used to print part of logger layout | ||
* | ||
* @author Anton Kurako (GoodforGod) | ||
* @since 14.03.2022 | ||
*/ | ||
interface Layout extends Comparable<Layout> { | ||
|
||
/** | ||
* @param loggerName of the logger invoked | ||
* @param level of the logger invoked | ||
* @param builder to append layout | ||
*/ | ||
void print(String loggerName, int level, StringBuilder builder); | ||
|
||
/** | ||
* @return order layout compared to all others layouts | ||
*/ | ||
int order(); | ||
|
||
@Override | ||
default int compareTo(Layout o) { | ||
return Integer.compare(order(), o.order()); | ||
} | ||
} |
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
Oops, something went wrong.