stumpless  2.1.0
info.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_INFO_H
28 # define __STUMPLESS_LEVEL_INFO_H
29 
30 # include <stumpless/level/mask.h>
31 
32 # ifndef STUMPLESS_DISABLE_INFO_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_INFO_LEVEL
98 # define stump_i( ... ) ( 0 )
99 # else
100 # define stump_i( ... ) \
101 stumpless_add_log( stumpless_get_current_target( ), \
102  STUMPLESS_SEVERITY_INFO | STUMPLESS_DEFAULT_FACILITY, \
103  __VA_ARGS__ )
104 # endif
105 
155 # ifdef STUMPLESS_DISABLE_INFO_LEVEL
156 # define stump_i_str( message ) ( 0 )
157 # else
158 # define stump_i_str( message ) \
159 stumpless_add_log_str( stumpless_get_current_target( ), \
160  STUMPLESS_SEVERITY_INFO | STUMPLESS_DEFAULT_FACILITY, \
161  ( message ) )
162 # endif
163 
207 # ifdef STUMPLESS_DISABLE_INFO_LEVEL
208 # define stump_i_entry( target, entry ) ( 0 )
209 # else
210 # define stump_i_entry( target, entry ) \
211 stumpless_add_entry( ( target ), ( entry ) )
212 # endif
213 
271 # ifdef STUMPLESS_DISABLE_INFO_LEVEL
272 # define stump_i_log( target, priority, ... ) ( 0 )
273 # else
274 # define stump_i_log( target, priority, ... ) \
275 stumpless_add_log( ( target ), ( priority ), __VA_ARGS__ )
276 #endif
277 
326 # ifdef STUMPLESS_DISABLE_INFO_LEVEL
327 # define stump_i_log_str( target, priority, message ) ( 0 )
328 # else
329 # define stump_i_log_str( target, priority, message ) \
330 stumpless_add_log_str( ( target ), ( priority ), ( message ) )
331 #endif
332 
393 # ifdef STUMPLESS_DISABLE_INFO_LEVEL
394 # define stump_i_message( target, ... ) ( 0 )
395 # else
396 # define stump_i_message( target, ... ) \
397 stumpless_add_log( ( target ), \
398  STUMPLESS_DEFAULT_FACILITY | STUMPLESS_SEVERITY_INFO, \
399  __VA_ARGS__ )
400 # endif
401 
453 # ifdef STUMPLESS_DISABLE_INFO_LEVEL
454 # define stump_i_message_str( target, message ) ( 0 )
455 # else
456 # define stump_i_message_str( target, message ) \
457 stumpless_add_log_str( ( target ), \
458  STUMPLESS_DEFAULT_FACILITY | STUMPLESS_SEVERITY_INFO, \
459  ( message ) )
460 # endif
461 
511 # ifdef STUMPLESS_DISABLE_INFO_LEVEL
512 # define stumplog_i( priority, ... ) ( ( void ) 0 )
513 # else
514 # define stumplog_i( priority, ... ) stumplog( ( priority ), __VA_ARGS__ )
515 # endif
516 
557 # ifdef STUMPLESS_DISABLE_INFO_LEVEL
558 # define stumplog_i_str( priority, message ) ( ( void ) 0 )
559 # else
560 # define stumplog_i_str( priority, message ) \
561 stumplog_str( ( priority ), ( message ) )
562 # endif
563 
564 #endif /* __STUMPLESS_LEVEL_INFO_H */
severity.h
mask.h
target.h
log.h
config.h