stumpless  2.1.0
crit.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0 */
2 
3 /*
4  * Copyright 2020-2022 Joel E. Anderson
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
27 #ifndef __STUMPLESS_LEVEL_CRIT_H
28 # define __STUMPLESS_LEVEL_CRIT_H
29 
30 # include <stumpless/level/mask.h>
31 
32 # ifndef STUMPLESS_DISABLE_CRIT_LEVEL
33 # include <stumpless/config.h>
34 # include <stumpless/log.h>
35 # include <stumpless/severity.h>
36 # include <stumpless/target.h>
37 # endif
38 
97 # ifdef STUMPLESS_DISABLE_CRIT_LEVEL
98 # define stump_c( ... ) ( 0 )
99 # else
100 # define stump_c( ... ) \
101 stumpless_add_log( stumpless_get_current_target( ), \
102  STUMPLESS_SEVERITY_CRIT | STUMPLESS_DEFAULT_FACILITY, \
103  __VA_ARGS__ )
104 # endif
105 
161 # ifdef STUMPLESS_DISABLE_CRIT_LEVEL
162 # define stump_c_str( message ) ( 0 )
163 # else
164 # define stump_c_str( message ) \
165 stumpless_add_log_str( stumpless_get_current_target( ), \
166  STUMPLESS_SEVERITY_CRIT | STUMPLESS_DEFAULT_FACILITY, \
167  ( message ) )
168 # endif
169 
214 # ifdef STUMPLESS_DISABLE_CRIT_LEVEL
215 # define stump_c_entry( target, entry ) ( 0 )
216 # else
217 # define stump_c_entry( target, entry ) \
218 stumpless_add_entry( ( target ), ( entry ) )
219 # endif
220 
279 # ifdef STUMPLESS_DISABLE_CRIT_LEVEL
280 # define stump_c_log( target, priority, ... ) ( 0 )
281 # else
282 # define stump_c_log( target, priority, ... ) \
283 stumpless_add_log( ( target ), ( priority ), __VA_ARGS__ )
284 #endif
285 
335 # ifdef STUMPLESS_DISABLE_CRIT_LEVEL
336 # define stump_c_log_str( target, priority, message ) ( 0 )
337 # else
338 # define stump_c_log_str( target, priority, message ) \
339 stumpless_add_log_str( ( target ), ( priority ), ( message ) )
340 #endif
341 
402 # ifdef STUMPLESS_DISABLE_CRIT_LEVEL
403 # define stump_c_message( target, ... ) ( 0 )
404 # else
405 # define stump_c_message( target, ... ) \
406 stumpless_add_log( ( target ), \
407  STUMPLESS_DEFAULT_FACILITY | STUMPLESS_SEVERITY_CRIT, \
408  __VA_ARGS__ )
409 # endif
410 
462 # ifdef STUMPLESS_DISABLE_CRIT_LEVEL
463 # define stump_c_message_str( target, message ) ( 0 )
464 # else
465 # define stump_c_message_str( target, message ) \
466 stumpless_add_log_str( ( target ), \
467  STUMPLESS_DEFAULT_FACILITY | STUMPLESS_SEVERITY_CRIT, \
468  ( message ) )
469 # endif
470 
521 # ifdef STUMPLESS_DISABLE_CRIT_LEVEL
522 # define stumplog_c( priority, ... ) ( ( void ) 0 )
523 # else
524 # define stumplog_c( priority, ... ) stumplog( ( priority ), __VA_ARGS__ )
525 # endif
526 
568 # ifdef STUMPLESS_DISABLE_CRIT_LEVEL
569 # define stumplog_c_str( priority, message ) ( ( void ) 0 )
570 # else
571 # define stumplog_c_str( priority, message ) \
572 stumplog_str( ( priority ), ( message ) )
573 # endif
574 
575 #endif /* __STUMPLESS_LEVEL_CRIT_H */
severity.h
mask.h
target.h
log.h
config.h