mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 03:31:26 +00:00
This patch: * fixes signatures for log_debug and log_pdu macros * collapses __log_<LEVEL> functions into one * adds conditional logging Here conditional logging means that the logging priority and logging level may vary depending on some dynamic parameters. This is helpful when software is able to recover from errors which occur periodically and hence, there is no need to pollute system logs with tons of repetitive non-critical lines. The following macros are added to support this feature: * log_info_cond * log_warning_cond * log_error_cond They take an additional first parameter called "level". If it is 0 then they act as their non-cond counterparts, otherwise they act like log_debug with the specified level. Those who are not interested in conditional logging are not affected: they can continue using plain old logging macros without any changes. Signed-off-by: Sergey Myasnikov <tigra564@gmail.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4161 d57e44dd-8a1f-0410-8b47-8ef2f437770f