Packages

package logging

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. logging
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package pretty

Type Members

  1. class BoundedQueue[A] extends Queue[A]
    Annotations
    @SuppressWarnings()
  2. 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.)

  3. 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> </encoder>

  4. case class ErrorLoggingContext(logger: TracedLogger, properties: Map[String, String], traceContext: TraceContext) extends ContextualizedErrorLogger with Product with Serializable

    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

  5. 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.

  6. 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()
  7. final class LoggerNameFromClass extends AnyVal
  8. 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.

  9. trait NamedLogging extends AnyRef
  10. 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

  11. final class Rewrite extends AnyRef

    Rewrite object used for logback.xml

  12. 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>

  13. class ThrottleFilterEvaluator extends EvaluatorFilter[ILoggingEvent]

    Throttles logging events, so that no more than maxLoggedOverPeriod unique events are logged over expiryPeriod.

    Throttles logging events, so that no more than maxLoggedOverPeriod unique events are logged over expiryPeriod. De-duplicates logging events over expiryPeriod. 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

  14. type TracedLogger = LoggerTakingImplicit[TraceContext]

    Alias the complex logger type we use which expects a implicit TraceContext to something more memorable

Value Members

  1. object ErrorLoggingContext extends Serializable
  2. object NamedLoggerFactory
  3. object NamedLogging
  4. object TracedLogger

Inherited from AnyRef

Inherited from Any

Ungrouped