class SimpleFormatter extends Formatter
SimpleFormatter represents the default formatter for the AVSL
logger. It uses simple %-escaped format strings, akin to the standard
C strftime() function. These escapes, described below, are more compact
than the format strings used by Java's SimpleDateFormat class; they
also don't suffer from the odd quoting conventions imposed by
SimpleDateFormat. However, they are mapped to SimpleDateFormat
patterns, so they are locale-, language-, and time zone-sensitive.
A SimpleFormatter accepts the following name/value pair arguments:
- format: The format to use. If not specified, there's a reasonable
default
- language: The language to use when formatting dates, using the Java
Locale values. If not specified, the default locale is used.
- country: The country to use when formatting dates, using the Java
Locale values. If not specified, the default locale is used.
- tz: The time zone to use. If not specified, the default is used.
The recognized format escapes are shown below. Anything else is displayed
literally. Many of the escapes are borrowed directly from strftime().
- %a: the short day-of-week name (e.g., "Wed") - %A: the long day-of-week name (e.g., "Wednesday") - %b: the abbreviated month name (e.g., "Mar", "Nov") - %B: the full month name (e.g., "March", "November") - %d: the day of the month - %D: equivalent to %m/%d/%y - %F: equivalent to %Y/%m/%d - %h: the hour of the day (0-12) - %H: the hour of the day (1-23) - %j: the day of the year (i.e., the so-called Julian day) - %l: the log level name (e.g., "INFO", "DEBUG") - %L: the log level's numeric value - %m: the month number (01-12) - %M: the current minute, zero-padded - %n: the short name of the logger (i.e., the last part of the class name) - %N: the full name of the logger (i.e., the class name) - %s: the current second, zero-padded - %S: the current millisecond, zero-padded - %t: the text of the log message - %T: the current thread name - %y: the 2-digit year - %Y: the full 4-digit year - %z: the time zone name (e.g., "UTC", "PDT", "EST") - %%: a literal "%"
- Alphabetic
- By Inheritance
- SimpleFormatter
- Formatter
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new SimpleFormatter(args: ConfiguredArguments)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val DefaultFormat: String
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val country: String
- val defaultLocale: Locale
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def format(logMessage: LogMessage): String
Format a log message, returning the formatted string.
Format a log message, returning the formatted string.
- logMessage
the log message to format
- returns
the formatted message
- Definition Classes
- SimpleFormatter → Formatter
- val formatString: String
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val language: String
- lazy val locale: Locale
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- val tz: TimeZone
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()