org.clapper.avsl.formatter

SimpleFormatter

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 "%"

Linear Supertypes
Formatter, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SimpleFormatter
  2. Formatter
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SimpleFormatter(args: ConfiguredArguments)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val DefaultFormat: String

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val country: String

  10. val defaultLocale: Locale

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. 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
    SimpleFormatterFormatter
  15. val formatString: String

  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. val language: String

  20. lazy val locale: Locale

  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. val tz: TimeZone

  27. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Formatter

Inherited from AnyRef

Inherited from Any

Ungrouped