Skip to content

Logging Batching

Daniel edited this page Mar 14, 2021 · 9 revisions

CodeMonkeys.Logging.Batching

Nuget

The CodeMonkeys.Logging.Batching package contains mechanisms to process log messages in batches. It is the base for the CodeMonkeys.Logging.File package.

The abstract BatchLogService class has a background queue which stores the log messages in-memory. When the timeout which was specified in the Options.FlushPeriod property is reached the abstract method PublishMessageBatch is called.

Options

Name Type Description Default value Remarks
FlushPeriod TimeSpan The period after which log messages will passed to the PublishMessageBatch method. 5 seconds
BatchCapacity int? The maximum number of items to include in a single batch. 50 - null for no limit