Replies: 1 comment
-
I remember a conversation about this (can't remember if on email, slack, or here on GH) from a few years back. Short answer: not currently easy. Within a plugin, you typically use a command such as this: this.loginfo(this, "some log message"); And it's the 'loginfo' that is setting the log level of that message. The logging plugin then determines if the message should be logged based on the global logging level. Within a plugin, you could probably hack up a solution that lets the plugin override the specified level based on a config setting. Completely untested and probably-not-working example: this.log(this, 'info', "some log message")
log (level, msg) {
const le = this.cfg.loglevel ?? level;
this[`log${le}`](this, msg)
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to change the loglevel for a single plugin?
Maybe something similar to this so I wouldn't have to restart Haraka?
echo DEBUG > config/loglevel
Beta Was this translation helpful? Give feedback.
All reactions