stumpless  2.1.0
trace.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0 */
2 
3 /*
4  * Copyright 2021-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 
31 #ifndef __STUMPLESS_LEVEL_TRACE_H
32 # define __STUMPLESS_LEVEL_TRACE_H
33 
34 # include <stumpless/level/mask.h>
35 
36 # ifndef STUMPLESS_DISABLE_TRACE_LEVEL
37 # include <stumpless/config.h>
38 # include <stumpless/log.h>
39 # include <stumpless/severity.h>
40 # include <stumpless/target.h>
41 # endif
42 
106 # ifdef STUMPLESS_DISABLE_TRACE_LEVEL
107 # define stump_t( ... ) ( 0 )
108 # else
109 # define stump_t( ... ) \
110 stumpless_trace_log( stumpless_get_current_target( ), \
111  STUMPLESS_SEVERITY_DEBUG | STUMPLESS_DEFAULT_FACILITY, \
112  __FILE__, \
113  __LINE__, \
114  __func__, \
115  __VA_ARGS__ )
116 # endif
117 
172 # ifdef STUMPLESS_DISABLE_TRACE_LEVEL
173 # define stump_t_str( message ) ( 0 )
174 # else
175 # define stump_t_str( message ) \
176 stumpless_trace_log_str( stumpless_get_current_target( ), \
177  STUMPLESS_SEVERITY_DEBUG | STUMPLESS_DEFAULT_FACILITY,\
178  __FILE__, \
179  __LINE__, \
180  __func__, \
181  ( message ) )
182 # endif
183 
233 # ifdef STUMPLESS_DISABLE_TRACE_LEVEL
234 # define stump_t_entry( target, entry ) ( 0 )
235 # else
236 # define stump_t_entry( target, entry ) \
237 stumpless_trace_entry( ( target ), ( entry ), __FILE__, __LINE__, __func__ )
238 # endif
239 
303 # ifdef STUMPLESS_DISABLE_TRACE_LEVEL
304 # define stump_t_log( target, priority, ... ) ( 0 )
305 # else
306 # define stump_t_log( target, priority, ... ) \
307 stumpless_trace_log( ( target ), \
308  ( priority ), \
309  __FILE__, \
310  __LINE__, \
311  __func__, \
312  __VA_ARGS__ )
313 #endif
314 
369 # ifdef STUMPLESS_DISABLE_TRACE_LEVEL
370 # define stump_t_log_str( target, priority, message ) ( 0 )
371 # else
372 # define stump_t_log_str( target, priority, message ) \
373 stumpless_trace_log_str( ( target ), \
374  ( priority ), \
375  __FILE__, \
376  __LINE__, \
377  __func__, \
378  ( message ) )
379 #endif
380 
445 # ifdef STUMPLESS_DISABLE_TRACE_LEVEL
446 # define stump_t_message( target, ... ) ( 0 )
447 # else
448 # define stump_t_message( target, ... ) \
449 stumpless_trace_log( ( target ), \
450  STUMPLESS_DEFAULT_FACILITY | STUMPLESS_SEVERITY_DEBUG, \
451  __FILE__, \
452  __LINE__, \
453  __func__, \
454  __VA_ARGS__ )
455 # endif
456 
512 # ifdef STUMPLESS_DISABLE_TRACE_LEVEL
513 # define stump_t_message_str( target, message ) ( 0 )
514 # else
515 # define stump_t_message_str( target, message ) \
516 stumpless_trace_log_str( ( target ), \
517  STUMPLESS_DEFAULT_FACILITY | STUMPLESS_SEVERITY_DEBUG,\
518  __FILE__, \
519  __LINE__, \
520  __func__, \
521  ( message ) )
522 # endif
523 
579 # ifdef STUMPLESS_DISABLE_TRACE_LEVEL
580 # define stumplog_t( priority, ... ) ( ( void ) 0 )
581 # else
582 # define stumplog_t( priority, ... ) \
583 stumplog_trace( ( priority ), __FILE__, __LINE__, __func__, __VA_ARGS__ )
584 # endif
585 
632 # ifdef STUMPLESS_DISABLE_TRACE_LEVEL
633 # define stumplog_t_str( priority, message ) ( ( void ) 0 )
634 # else
635 # define stumplog_t_str( priority, message ) \
636 stumplog_trace_str( ( priority ), __FILE__, __LINE__, __func__, ( message ) )
637 # endif
638 
639 #endif /* __STUMPLESS_LEVEL_TRACE_H */
severity.h
mask.h
target.h
log.h
config.h