Line data Source code
1 0 : /*
2 : * Copyright (c) 2018 Oticon A/S
3 : *
4 : * SPDX-License-Identifier: Apache-2.0
5 : */
6 : #ifndef ZEPHYR_INCLUDE_ARCH_POSIX_POSIX_TRACE_H_
7 : #define ZEPHYR_INCLUDE_ARCH_POSIX_POSIX_TRACE_H_
8 :
9 : #include <stdarg.h>
10 :
11 : #ifdef __cplusplus
12 : extern "C" {
13 : #endif
14 :
15 0 : void posix_vprint_error_and_exit(const char *format, va_list vargs);
16 0 : void posix_vprint_warning(const char *format, va_list vargs);
17 0 : void posix_vprint_trace(const char *format, va_list vargs);
18 0 : void posix_print_error_and_exit(const char *format, ...);
19 0 : void posix_print_warning(const char *format, ...);
20 0 : void posix_print_trace(const char *format, ...);
21 : /*
22 : * Return 1 if traces to <output> will go to a tty.
23 : * When printing to a terminal we may use ASCII escapes for color or other
24 : * niceties.
25 : * But when redirecting to files, or piping to other commands, those should be
26 : * disabled by default.
27 : *
28 : * Where the <output> should be set to 0 to query about posix_print_trace output
29 : * (typically STDOUT)
30 : * and 1 to query about the warning and error output (posix_print_error/warning)
31 : * outputs (typically STDERR)
32 : */
33 0 : int posix_trace_over_tty(int output);
34 :
35 : #ifdef __cplusplus
36 : }
37 : #endif
38 :
39 : #endif
|