core: add log_get_max_level check optimization in log_unit_full
authorLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 21 Apr 2020 16:23:21 +0000 (17:23 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 30 May 2020 17:59:26 +0000 (19:59 +0200)
commita0cd882be8916f19df1a66d4a48eb7b9b0cd5615
treef8b3924f7960e3ecef45a7fe9e243db9e480be76
parent2a6ad1093c3c759115b695f253ecb1efa1cd92fa
core: add log_get_max_level check optimization in log_unit_full

Just as log_full already does, check if the log level would result in
logging immediately in the macro in order to avoid doing
unnecessary work that adds up in hot spots.

(cherry picked from commit c5bc2c01eef4d3defb58245960065a063f5f75cf)
src/core/unit.h