caliper icon indicating copy to clipboard operation
caliper copied to clipboard

Extend the logging module with the capability of dropping messages

Open aklenik opened this issue 5 years ago • 0 comments

Context

If every winston transport is "above" a certain log level, then messages up to that level should not be processed.

Expected Behavior

For example, if every transport has an info level, then debug messages should be dropped as soon as possible.

Desirable, if we instrument the code with additional debug logs, as stated by #536

Actual Behavior

Debug messages go through the logging pipeline (e.g., stringifying and coloring metadata!), just to be dropped by the winston transports.

Possible Fix

Add a winston format or decorator logger class that immediately drops messages below a log level (calculated from the log levels of underlying transports).

Your Environment

  • Version used: Caliper v0.4.1

aklenik avatar Nov 04 '20 08:11 aklenik