package formatter
Type Members
-
trait
Formatter
extends AnyRef
Basic interface for a message formatter.
- class NullFormatter extends Formatter
-
class
SimpleFormatter
extends Formatter
SimpleFormatter
represents the default formatter for the AVSL logger.SimpleFormatter
represents the default formatter for the AVSL logger. It uses simple %-escaped format strings, akin to the standard Cstrftime()
function. These escapes, described below, are more compact than the format strings used by Java'sSimpleDateFormat
class; they also don't suffer from the odd quoting conventions imposed bySimpleDateFormat
. However, they are mapped toSimpleDateFormat
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 JavaLocale
values. If not specified, the default locale is used. -country
: The country to use when formatting dates, using the JavaLocale
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 "%"