Countly / countly-server

Countly is a product analytics platform that helps teams track, analyze and act-on their user actions and behaviour on mobile, web and desktop applications.
https://countly.com
Other
5.52k stars 967 forks source link

Logger level #5306

Open rstevgeniy opened 1 month ago

rstevgeniy commented 1 month ago

Should not this https://github.com/Countly/countly-server/blob/59c9403ca72c0bbf7050dbc97ec464b12d035748/api/utils/log.js#L66-L71

be rewritten as this?

const ACCEPTABLE = {
    d: ['debug', 'info', 'warn', 'error'],
    i: ['info', 'warn', 'error'],
    w: ['warn', 'error'],
    e: ['error'],
};

When we set logger level to debug we want all logs of all levels to be shown. And when we set to error we want only errors to be shown.