1 /*
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 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 void posix_print_error_and_exit(const char *format, ...);
14 void posix_print_warning(const char *format, ...);
15 void posix_print_trace(const char *format, ...);
16 /*
17  * Return 1 if traces to <output> will go to a tty.
18  * When printing to a terminal we may use ASCII escapes for color or other
19  * niceties.
20  * But when redirecting to files, or piping to other commands, those should be
21  * disabled by default.
22  *
23  * Where the <output> should be set to 0 to query about posix_print_trace output
24  * (typically STDOUT)
25  * and 1 to query about the warning and error output (posix_print_error/warning)
26  * outputs (typically STDERR)
27  */
28 int posix_trace_over_tty(int output);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif
35