package logging
- Alphabetic
- By Inheritance
- logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class BoundedQueue[A] extends Queue[A]
- Annotations
- @SuppressWarnings()
- class CantonFilterEvaluator extends EvaluatorFilter[ILoggingEvent]
Filters out any events with log level strictly lower than "LOG_LEVEL_CANTON" and logger name starting with "com.daml" or "com.digitalasset".
Filters out any events with log level strictly lower than "LOG_LEVEL_CANTON" and logger name starting with "com.daml" or "com.digitalasset". The property "LOG_LEVEL_CANTON" is first read from java system properties, then from the shell environment and then the default of INFO is taken. (This is consistent with the standard logback behavior.)
- class CantonJsonEncoder extends LogstashEncoder
canton specific json log encoding
canton specific json log encoding
equivalent of: <encoder class="net.logstash.logback.encoder.LogstashEncoder"> <excludeMdcKeyName>err-context</excludeMdcKeyName> <shortenedLoggerNameLength>30</shortenedLoggerNameLength> </encoder>
- final case class ErrorLoggingContext(logger: TracedLogger, properties: Map[String, String], traceContext: TraceContext) extends ErrorLoggingContextBase with Product with Serializable
- abstract class ErrorLoggingContextBase extends ContextualizedErrorLogger
Enriches a com.digitalasset.canton.tracing.TraceContext with a fixed logger and a set of properties.
Enriches a com.digitalasset.canton.tracing.TraceContext with a fixed logger and a set of properties. Use this class as an implicit parameter of methods inside helper classes whose class name shall not show up in the log line as part of the logger name. Instead, the logger name and properties are fixed when this object is created, which typically happens at a call site further up via NamedLogging.errorLoggingContext.
This class is primarily used with the
com.daml.error
framework for logging an error when it is created.- See also
NamedLoggingContext for another variant where the logger name is not fixed
NamedLogging.errorLoggingContext converts
- trait HasLoggerName extends Any
Defines implicits for obtaining the class used to create a logger out of a NamedLoggerFactory in a NamedLoggingContext.
Defines implicits for obtaining the class used to create a logger out of a NamedLoggerFactory in a NamedLoggingContext.
Extends scala.Any such that this can be used also for scala.AnyVal objects.
- class LastErrorsAppender extends AppenderBase[ILoggingEvent] with AppenderAttachable[ILoggingEvent]
Logback appender that keeps a bounded queue of errors/warnings that have been logged and associated log entries with the same trace-id.
Logback appender that keeps a bounded queue of errors/warnings that have been logged and associated log entries with the same trace-id.
- Annotations
- @SuppressWarnings()
- final case class LedgerErrorLoggingContext(logger: TracedLogger, properties: Map[String, String], traceContext: TraceContext, explicitCorrelationId: String) extends ErrorLoggingContextBase with Product with Serializable
- final class LoggerNameFromClass extends AnyVal
- class LoggingContextWithTrace extends LoggingContext
Class to enrich com.digitalasset.canton.logging.ErrorLoggingContext with com.digitalasset.canton.tracing.TraceContext
- trait NamedLoggerFactory extends AnyRef
NamedLoggerFactory augments a regular class-based slf4j logger with one annotated with a "name" where the name provides human readable context identifying a class instance, e.g.
NamedLoggerFactory augments a regular class-based slf4j logger with one annotated with a "name" where the name provides human readable context identifying a class instance, e.g. which participant in a set of participants has logged a particular message.
The name can be constructed in a nested, left-to-right append manner.
- trait NamedLogging extends AnyRef
- final case class NamedLoggingContext(loggerFactory: NamedLoggerFactory, traceContext: TraceContext) extends Product with Serializable
Enriches a com.digitalasset.canton.tracing.TraceContext with a NamedLoggerFactory.
Enriches a com.digitalasset.canton.tracing.TraceContext with a NamedLoggerFactory. This allows to pass a NamedLoggerFactory into methods that themselves do not have a NamedLoggerFactory in scope on their own, e.g., because they live inside a static object or in pure data classes.
The logging methods of this class include the class's or object's name in the logger name. To that end, the class or object should extend HasLoggerName. This ensures that the logger's name in the log file is close to where the log message was actually created.
- See also
NamedLogging.namedLoggingContext for implicitly creating this from the NamedLoggerFactory of the caller
ErrorLoggingContext for a variant that fixes the logger name to the caller
- final class Rewrite extends AnyRef
Rewrite object used for logback.xml
- class RewritingAppender extends AppenderBase[ILoggingEvent] with AppenderAttachable[ILoggingEvent]
Rewriting log appender
Rewriting log appender
Allows to rewrite log levels of external appenders. A logback implementation of http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/rewrite/RewriteAppender.html
If testing is set to true, we will include the rewrite rules that are marked as testing only.
Usage: <appender name="REWRITE_LOG_LEVEL" class="com.digitalasset.canton.logging.RewritingAppender"> <testing>true</testing> <appender-ref ref="CANTON_TEST_LOG" /> <rewrite class="com.digitalasset.canton.logging.Rewrite"> <logger>io.grpc.netty.NettyServerStream</logger> <maxLevel>INFO</maxLevel> </rewrite> <rewrite class="com.digitalasset.canton.logging.Rewrite"> <logger>com.digitalasset.canton.participant.ParticipantNodeInit:test/ParticipantRestartTest/participant/participant1</logger> <contains>Unclean shutdown due to cancellation in</contains> <exceptionMessage>test exception</exceptionMessage> <maxLevel>INFO</maxLevel> <testing>true</testing> </rewrite> </appender>
- class ThrottleFilterEvaluator extends EvaluatorFilter[ILoggingEvent]
Throttles logging events, so that no more than
maxLoggedOverPeriod
unique events are logged overexpiryPeriod
.Throttles logging events, so that no more than
maxLoggedOverPeriod
unique events are logged overexpiryPeriod
. De-duplicates logging events overexpiryPeriod.
Used to ensure that the interactive console remains usable even when the system is in a bad state and logging many errors. Inspired by https://github.com/RotterdamLogisticsLab/logback-throttle/blob/master/src/main/kotlin/com/portofrotterdam/dbs/public/logback/throttle/Throttle.kt - type TracedLogger = LoggerTakingImplicit[TraceContext]
Alias the complex logger type we use which expects a implicit TraceContext to something more memorable
Value Members
- object ErrorLoggingContext extends Serializable
- object LoggingContextUtil
- object LoggingContextWithTrace
- object NamedLoggerFactory
- object NamedLogging
- object TracedLogger
- object TracedLoggerOps