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

  4. 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>
  5. trait ErrorLoggingContext extends BaseErrorLogger

    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.

    See also

    NamedLoggingContext for another variant where the logger name is not fixed

    NamedLogging.errorLoggingContext converts

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

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

    Class to enrich com.digitalasset.canton.logging.ErrorLoggingContext with com.digitalasset.canton.tracing.TraceContext

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

  11. trait NamedLogging extends AnyRef
  12. 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

  13. class NoLogging extends ErrorLoggingContext
  14. final class Rewrite extends AnyRef

    Rewrite object used for logback.xml

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

    Note that the logger name can be specific, including test names and other context info separated using colons or slashes, but can also just be the base logger name which then applies to all tests.

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

  17. 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
  2. object LoggingContextUtil
  3. object LoggingContextWithTrace
  4. object NamedLoggerFactory
  5. object NamedLogging
  6. object NoLogging extends NoLogging
  7. object NodeLoggingUtil

    Set of utility methods to access logging information of this node

  8. object TracedLogger
  9. object TracedLoggerOps

Inherited from AnyRef

Inherited from Any

Ungrouped