-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add loggers configuration #278
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package fly4s.data | ||
Check notice Code scanning / Scalastyle (reported by Codacy) File must not end with newline character. Note
File must not end with newline character.
Check notice Code scanning / Scalastyle (reported by Codacy) Header does not match expected text. Note
Header does not match expected text.
|
||
|
||
abstract sealed class LoggerType(val tpeValue: String) | ||
object LoggerType { | ||
case object Auto extends LoggerType("auto") | ||
case object Console extends LoggerType("console") | ||
case object Slf4j extends LoggerType("slf4j") | ||
case object Log4j2 extends LoggerType("log4j2") | ||
case object ApacheCommons extends LoggerType("apache-commons") | ||
case class Custom(fullyQualifiedClassName: String) extends LoggerType(fullyQualifiedClassName) | ||
|
||
def toFlywayValue(ltype: LoggerType): String = ltype.tpeValue | ||
|
||
def fromFlywayValue(value: String): LoggerType = value match { | ||
case Auto.tpeValue => Auto | ||
case Console.tpeValue => Console | ||
case Slf4j.tpeValue => Slf4j | ||
case Log4j2.tpeValue => Log4j2 | ||
case ApacheCommons.tpeValue => ApacheCommons | ||
case custom => Custom(custom) | ||
} | ||
} |
Check notice
Code scanning / Scalastyle (reported by Codacy)
Field name does not match the regular expression '^[A-Z][A-Za-z0-9]*$'. Note