sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
ftlogging.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * ftlogging.h
4 *
5 * Additional debugging APIs.
6 *
7 * Copyright (C) 2020-2025 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
9 *
10 * This file is part of the FreeType project, and may only be used,
11 * modified, and distributed under the terms of the FreeType project
12 * license, LICENSE.TXT. By continuing to use, modify, or distribute
13 * this file you indicate that you have read the license and
14 * understand and accept it fully.
15 *
16 */
17
18
23#ifndef FTLOGGING_H_
24#define FTLOGGING_H_
25
26
27#include <ft2build.h>
28#include FT_CONFIG_CONFIG_H
29
30
31FT_BEGIN_HEADER
32
33
34 /**************************************************************************
35 *
36 * @section:
37 * debugging_apis
38 *
39 * @title:
40 * External Debugging APIs
41 *
42 * @abstract:
43 * Public APIs to control the `FT_DEBUG_LOGGING` macro.
44 *
45 * @description:
46 * This section contains the declarations of public functions that
47 * enables fine control of what the `FT_DEBUG_LOGGING` macro outputs.
48 *
49 */
50
51
52 /**************************************************************************
53 *
54 * @function:
55 * FT_Trace_Set_Level
56 *
57 * @description:
58 * Change the levels of tracing components of FreeType at run time.
59 *
60 * @input:
61 * tracing_level ::
62 * New tracing value.
63 *
64 * @example:
65 * The following call makes FreeType trace everything but the 'memory'
66 * component.
67 *
68 * ```
69 * FT_Trace_Set_Level( "any:7 memory:0" );
70 * ```
71 *
72 * @note:
73 * This function does nothing if compilation option `FT_DEBUG_LOGGING`
74 * isn't set.
75 *
76 * @since:
77 * 2.11
78 *
79 */
80 FT_EXPORT( void )
81 FT_Trace_Set_Level( const char* tracing_level );
82
83
84 /**************************************************************************
85 *
86 * @function:
87 * FT_Trace_Set_Default_Level
88 *
89 * @description:
90 * Reset tracing value of FreeType's components to the default value
91 * (i.e., to the value of the `FT2_DEBUG` environment value or to NULL
92 * if `FT2_DEBUG` is not set).
93 *
94 * @note:
95 * This function does nothing if compilation option `FT_DEBUG_LOGGING`
96 * isn't set.
97 *
98 * @since:
99 * 2.11
100 *
101 */
102 FT_EXPORT( void )
103 FT_Trace_Set_Default_Level( void );
104
105
106 /**************************************************************************
107 *
108 * @functype:
109 * FT_Custom_Log_Handler
110 *
111 * @description:
112 * A function typedef that is used to handle the logging of tracing and
113 * debug messages on a file system.
114 *
115 * @input:
116 * ft_component ::
117 * The name of `FT_COMPONENT` from which the current debug or error
118 * message is produced.
119 *
120 * fmt ::
121 * Actual debug or tracing message.
122 *
123 * args::
124 * Arguments of debug or tracing messages.
125 *
126 * @since:
127 * 2.11
128 *
129 */
130 typedef void
131 (*FT_Custom_Log_Handler)( const char* ft_component,
132 const char* fmt,
133 va_list args );
134
135
136 /**************************************************************************
137 *
138 * @function:
139 * FT_Set_Log_Handler
140 *
141 * @description:
142 * A function to set a custom log handler.
143 *
144 * @input:
145 * handler ::
146 * New logging function.
147 *
148 * @note:
149 * This function does nothing if compilation option `FT_DEBUG_LOGGING`
150 * isn't set.
151 *
152 * @since:
153 * 2.11
154 *
155 */
156 FT_EXPORT( void )
157 FT_Set_Log_Handler( FT_Custom_Log_Handler handler );
158
159
160 /**************************************************************************
161 *
162 * @function:
163 * FT_Set_Default_Log_Handler
164 *
165 * @description:
166 * A function to undo the effect of @FT_Set_Log_Handler, resetting the
167 * log handler to FreeType's built-in version.
168 *
169 * @note:
170 * This function does nothing if compilation option `FT_DEBUG_LOGGING`
171 * isn't set.
172 *
173 * @since:
174 * 2.11
175 *
176 */
177 FT_EXPORT( void )
178 FT_Set_Default_Log_Handler( void );
179
180 /* */
181
182
183FT_END_HEADER
184
185#endif /* FTLOGGING_H_ */
186
187
188/* END */