package logging
- Alphabetic
- By Inheritance
- logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class ConsoleHandler extends Handler
Log things to the console.
- class FileHandler extends Handler
A log handler that writes log entries into a file, and rolls this file at a requested interval (hourly, daily, or weekly).
- class Formatter extends java.util.logging.Formatter
A standard log formatter for scala.
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.
- abstract class Handler extends java.util.logging.Handler
A base log handler for scala.
A base log handler for scala. This extends the java built-in handler and connects it with a formatter automatically.
- type HandlerFactory = () => Handler
- trait HasLogLevel extends AnyRef
Typically mixed into
Exceptions
to indicate what Level they should be logged at.Typically mixed into
Exceptions
to indicate what Level they should be logged at.- See also
Finagle's
com.twitter.finagle.Failure
.
- class LazyLogRecord extends LogRecord
- class LazyLogRecordUnformatted extends LazyLogRecord
A lazy LogRecord that needs formatting
- sealed abstract class Level extends java.util.logging.Level
- class LogRecord extends java.util.logging.LogRecord
Wrapper around
java.util.logging.LogRecord
.Wrapper around
java.util.logging.LogRecord
. Should only be accessed from a single thread.Messages are formatted by Java's LogRecord using
java.text.MessageFormat
whereas this class uses a regularjava.text.StringFormat
.This class takes com.twitter.logging.Logger into account when inferring the
sourceMethod
andsourceClass
names. - class Logger extends AnyRef
Scala wrapper for logging.
- case class LoggerFactory(node: String = "", level: Option[Level] = None, handlers: List[HandlerFactory] = Nil, useParents: Boolean = true) extends () => Logger with Product with Serializable
A factory to configure a Logger.
A factory to configure a Logger. Note that because Loggers are global, executing this factory has side-effects.
- node
Name of the logging node. The default ("") is the top-level logger.
- level
Log level for this node. Leaving it None is java's secret signal to use the parent logger's level.
- handlers
Where to send log messages.
- useParents
Override to have log messages stop at this node. Otherwise they are passed up to parent nodes.
- class LoggerFactoryBuilder extends AnyRef
Shim for java compatibility.
Shim for java compatibility. Make a new LoggerFactoryBuilder with
LoggerFactory#newBuilder()
. - trait Logging extends AnyRef
A com.twitter.app.App mixin to use for logging.
A com.twitter.app.App mixin to use for logging. Defines flags to configure the (default) logger setup. When adding logging to a twitter-server, mix in a trait that extends Logging but overrides factories.
- class LoggingException extends Exception
- sealed abstract class Policy extends AnyRef
- abstract class ProxyHandler extends Handler
A log handler class which delegates to another handler.
A log handler class which delegates to another handler. This allows to implement filtering log handlers.
- class QueueingHandler extends ProxyHandler
Proxy handler that queues log records and publishes them in another thread to a nested handler.
Proxy handler that queues log records and publishes them in another thread to a nested handler. Useful for when a handler may block.
- class StringHandler extends Handler
Mostly useful for unit tests: logging goes directly into a string buffer.
- class SyslogFormatter extends Formatter
- class SyslogHandler extends Handler
- class ThrottledHandler extends ProxyHandler
NOTE: ThrottledHandler emits plain-text messages regarding any throttling it does.
NOTE: ThrottledHandler emits plain-text messages regarding any throttling it does. This means that using it to wrap any logger which you expect to produce easily parseable, well-structured logs (as opposed to just plain text logs) will break your format. Specifically, DO NOT wrap Thrift Scribing loggers with ThrottledHandler.
Deprecated Type Members
- trait TestLogging extends BeforeAndAfter
Specify logging during unit tests via system property, defaulting to FATAL only.
Specify logging during unit tests via system property, defaulting to FATAL only.
- Annotations
- @deprecated
- Deprecated
(Since version 2019-11-20) Prefer using slf4j for logging
Value Members
- object BareFormatter extends Formatter
Formatter that logs only the text of a log message, with no prefix (no date, etc).
- object ConsoleHandler
- object FileHandler
- object HasLogLevel
- object Level extends Serializable
- object LogRecord extends Serializable
- object Logger extends Iterable[Logger]
- object LoggerFactory extends Serializable
- object Logging
- object NullHandler extends Handler
- object NullLogger extends Logger
- object Policy
- object QueueingHandler
- object StringHandler
- object SyslogFuture
- object SyslogHandler
- object ThrottledHandler