Mercurial > molko
comparison libmlk-core/core/trace.h @ 253:c4da052c0def
core: goodbye doxygen
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 03 Dec 2020 09:06:52 +0100 |
parents | 71b3b7036de7 |
children | 08ab73b32832 |
comparison
equal
deleted
inserted
replaced
252:95c2c4a72410 | 253:c4da052c0def |
---|---|
17 */ | 17 */ |
18 | 18 |
19 #ifndef MOLKO_CORE_TRACE_H | 19 #ifndef MOLKO_CORE_TRACE_H |
20 #define MOLKO_CORE_TRACE_H | 20 #define MOLKO_CORE_TRACE_H |
21 | 21 |
22 /** | |
23 * \file trace.h | |
24 * \brief Non-fatal message logs. | |
25 * | |
26 * The purpose of this module is to provide a feedback from the code when there | |
27 * are non-fatal programming error or unexpected results. In contrast to the | |
28 * \ref debug.h module this one is always activated no manner if the build | |
29 * is in Debug or Release. | |
30 * | |
31 * For example, having an animation with a delay of 0 is not a technical issue | |
32 * but is probably not what the use wants. Thus, a trace warning may be | |
33 * generated in that way. | |
34 */ | |
35 | |
36 #include <stdarg.h> | 22 #include <stdarg.h> |
37 | 23 |
38 /** | |
39 * \brief Maximum length for a trace log. | |
40 */ | |
41 #define TRACE_LINE_MAX (1024) | 24 #define TRACE_LINE_MAX (1024) |
42 | 25 |
43 /** | |
44 * \brief Global trace handler. | |
45 * | |
46 * The default one use a simple printf on the standard output. | |
47 */ | |
48 extern void (*trace_handler)(const char *); | 26 extern void (*trace_handler)(const char *); |
49 | 27 |
50 /** | |
51 * Log some information. | |
52 * | |
53 * \pre fmt != NULL | |
54 * \param fmt the printf(3) format string | |
55 */ | |
56 void | 28 void |
57 tracef(const char *fmt, ...); | 29 tracef(const char *fmt, ...); |
58 | 30 |
59 /** | |
60 * Similar to \ref tracef with a va_list arguments pointer. | |
61 * | |
62 * \pre fmt != NULL | |
63 * \param fmt the printf(3) format string | |
64 * \param ap the argument list | |
65 */ | |
66 void | 31 void |
67 vtracef(const char *fmt, va_list ap); | 32 traceva(const char *fmt, va_list ap); |
68 | 33 |
69 #endif /* !MOLKO_CORE_TRACE_H */ | 34 #endif /* !MOLKO_CORE_TRACE_H */ |