class Formatter extends java.util.logging.Formatter

A standard log formatter for scala. This extends the java built-in log formatter.

Truncation, exception formatting, multi-line logging, and time zones are handled in this class. Subclasses are called for formatting the line prefix, formatting the date, and determining the line terminator.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Formatter
  2. Formatter
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Formatter(timezone: Option[String] = None, truncateAt: Int = 0, truncateStackTracesAt: Int = Formatter.DefaultStackTraceSizeLimit, useFullPackageNames: Boolean = false, prefix: String = Formatter.DefaultPrefix)

    timezone

    Should dates in log messages be reported in a different time zone rather than local time? If set, the time zone name must be one known by the java TimeZone class.

    truncateAt

    Truncate log messages after N characters. 0 = don't truncate (the default).

    truncateStackTracesAt

    Truncate stack traces in exception logging (line count).

    useFullPackageNames

    Use full package names like "com.example.thingy" instead of just the toplevel name like "thingy"?

    prefix

    Format for the log-line prefix, if any. There are two positional format strings (printf-style): the name of the level being logged (for example, "ERROR") and the name of the package that's logging (for example, "jobs"). A string in < angle brackets > will be used to format the log entry's timestamp, using java's SimpleDateFormat. For example, a format string of: "%.3s [<yyyyMMdd-HH:mm:ss.SSS>] %s: " will generate a log line prefix of: "ERR [20080315-18:39:05.033] jobs: "

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val calendar: GregorianCalendar

    Calendar to use for time zone display in date-time formatting.

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def dateFormat: DateFormat

    Return the date formatter to use for log messages.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. def format(record: java.util.logging.LogRecord): String
    Definition Classes
    Formatter → Formatter
  12. def formatLevelName(level: java.util.logging.Level): String

    Return the string representation of a given log level's name

  13. def formatMessage(arg0: java.util.logging.LogRecord): String
    Definition Classes
    Formatter
  14. def formatMessageLines(record: java.util.logging.LogRecord): Array[String]

    Truncates and formats the message of the given LogRecord.

    Truncates and formats the message of the given LogRecord. Formatting entails inserting any LogRecord parameters into the LogRecord message string. Truncation of the message text is controlled by the truncateAt parameter. If it is greater than 0, messages will be truncated at that length and ellipses appended. Messages are then returned as an array of lines where each entry is the line of text between newlines.

    record

    a javalog.LogRecord

    returns

    an Array representing the formatted lines of a messages.

    See also

    javalog.LogRecord#getParameters

  15. def formatName(record: java.util.logging.LogRecord): String

    Returns the formatted name of the node given a LogRecord

  16. def formatPrefix(level: java.util.logging.Level, date: String, name: String): String

    Return the string to prefix each log message with, given a log level, formatted date string, and package name.

  17. def formatText(record: java.util.logging.LogRecord): String

    Return formatted text from a java LogRecord.

  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def getHead(arg0: java.util.logging.Handler): String
    Definition Classes
    Formatter
  20. def getTail(arg0: java.util.logging.Handler): String
    Definition Classes
    Formatter
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def lineTerminator: String

    Return the line terminator (if any) to use at the end of each log message.

  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. val prefix: String
  28. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  29. val timezone: Option[String]
  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. val truncateAt: Int
  32. val truncateStackTracesAt: Int
  33. def truncateText(message: String): String

    Truncates the text from a java LogRecord, if necessary

  34. val useFullPackageNames: Boolean
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped