0

There are different sinks in code. Each sink has its rotation_size and max_size. Is there some way to constrain total size of all log sizes of all sinks?

yanran
  • 33
  • 5

1 Answers1

0

As described in the docs, max_size limits the total size of the rotated files in the target storage. This limit is enforced for all log files that are placed in that particular storage, even if by multiple sinks. When you add multiple sinks that use the same target storage, only the storage limits specified for the first sink are used. Subsequently created sinks reuse the file collector for the target storage that was created for the first sink.

If you want to limit the total size of log files across multiple target storages then there is no direct way to do this, other than to limit each storage separately, which will effectively limit their total size.

Andrey Semashev
  • 10,046
  • 1
  • 17
  • 27