PagingSelfAwareStructuredLogger

org.typelevel.log4cats.PagingSelfAwareStructuredLogger

Attributes

Source
PagingSelfAwareStructuredLogger.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def paged[F[_] : UUIDGen](pageSizeK: Int, maxPageNeeded: Int)(logger: SelfAwareStructuredLogger[F]): SelfAwareStructuredLogger[F]

Wrap a SelfAwareStructuredLogger adding pagination functionality to avoid the truncation (hard splitting) by the underline logging provider.

Wrap a SelfAwareStructuredLogger adding pagination functionality to avoid the truncation (hard splitting) by the underline logging provider. For the functions with a Throwable parameter, the stack trace is appended to the message before pagination.

The actual text to be logged has 3 parts:

Part 1. The chunk of message in each page; Part 2. This function will add the page header and footer; Part 3. The base class SelfAwareStructuredLogger may add tracing data etc logging context.

The total of the above 3 parts should be smaller than the log size limit of the underline logging provider to avoid hard splitting.

Example: Assume the log size limit of the underline logging provider is 75 Kb, setting pageSizeK to 64 leaves 11 Kb for (part 2) and (part 3).

Type parameters

F

Effect type class.

Value parameters

logger

The SelfAwareStructuredLogger to be used to do the actual logging.

maxPageNeeded

The maximum number of pages to be logged.

pageSizeK

The size (in unit kibibyte) of the chunk of message in each page.

Attributes

Returns

SelfAwareStructuredLogger with pagination.

Source
PagingSelfAwareStructuredLogger.scala

Deprecated methods

def withPaging[F[_] : Monad](pageSizeK: Int, maxPageNeeded: Int)(logger: SelfAwareStructuredLogger[F]): SelfAwareStructuredLogger[F]

Attributes

Deprecated
true
Source
PagingSelfAwareStructuredLogger.scala