]> git.ipfire.org Git - people/ms/suricata.git/commit
rust/log: expand macros after checking log level
authorJason Ish <jason.ish@oisf.net>
Mon, 16 Nov 2020 17:36:39 +0000 (11:36 -0600)
committerVictor Julien <victor@inliniac.net>
Tue, 17 Nov 2020 13:05:30 +0000 (14:05 +0100)
commit411a5d41c1e108fa183175a5869e3d1451f862cf
treefb070fdcc4357bff98c40484b1db4c187dc10371
parent269324e84d79c4860533967e7fe226e3a9106613
rust/log: expand macros after checking log level

Expand macros in the do_log macro after checking the log level
instead of each log macro (ie: SCLogDebug) expanding the macros
then passing off to do_log to have the log level check.

Will eliminate any expense of expanding macros if this log level
does not permit the given message to be logged.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4114
rust/src/log.rs