Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/graphite2/Log.h @ 69:33d812a61356
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 17:55:14 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 69:33d812a61356 |
---|---|
1 /* GRAPHITE2 LICENSING | |
2 | |
3 Copyright 2010, SIL International | |
4 All rights reserved. | |
5 | |
6 This library is free software; you can redistribute it and/or modify | |
7 it under the terms of the GNU Lesser General Public License as published | |
8 by the Free Software Foundation; either version 2.1 of License, or | |
9 (at your option) any later version. | |
10 | |
11 This program is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 Lesser General Public License for more details. | |
15 | |
16 You should also have received a copy of the GNU Lesser General Public | |
17 License along with this library in the file named "LICENSE". | |
18 If not, write to the Free Software Foundation, 51 Franklin Street, | |
19 Suite 500, Boston, MA 02110-1335, USA or visit their web page on the | |
20 internet at http://www.fsf.org/licenses/lgpl.html. | |
21 | |
22 Alternatively, the contents of this file may be used under the terms | |
23 of the Mozilla Public License (http://mozilla.org/MPL) or the GNU | |
24 General Public License, as published by the Free Software Foundation, | |
25 either version 2 of the License or (at your option) any later version. | |
26 */ | |
27 #pragma once | |
28 | |
29 #include <graphite2/Types.h> | |
30 #include <graphite2/Font.h> | |
31 #include <stdio.h> | |
32 | |
33 #ifdef __cplusplus | |
34 extern "C" | |
35 { | |
36 #endif | |
37 | |
38 /** deprecated mechanism that doesn't do anything now. */ | |
39 typedef enum { | |
40 GRLOG_NONE = 0x0, | |
41 GRLOG_FACE = 0x01, | |
42 GRLOG_SEGMENT = 0x02, | |
43 GRLOG_PASS = 0x04, | |
44 GRLOG_CACHE = 0x08, | |
45 | |
46 GRLOG_OPCODE = 0x80, | |
47 GRLOG_ALL = 0xFF | |
48 } GrLogMask; | |
49 | |
50 /** Start logging all segment creation and updates on the provided face. This | |
51 * is logged to a JSON file, see "Segment JSON Schema.txt" for a precise | |
52 * definition of the file | |
53 * | |
54 * @return true if the file was successfully created and logging is correctly | |
55 * initialised. | |
56 * @param face the gr_face whose segments you want to log to the given file | |
57 * @param log_path a utf8 encoded file name and path to log to. | |
58 */ | |
59 GR2_API bool gr_start_logging(gr_face * face, const char *log_path); | |
60 | |
61 | |
62 /** Stop logging on the given face. This will close the log file created by | |
63 * gr_start_logging. | |
64 * | |
65 * @param face the gr_face whose segments you want to stop logging | |
66 */ | |
67 GR2_API void gr_stop_logging(gr_face * face); | |
68 | |
69 /** Start logging to a FILE object. | |
70 * This function is deprecated as of 1.2.0, use the _face versions instead. | |
71 * | |
72 * @return True on success | |
73 * @param logfile FILE reference to output logging to | |
74 * @param mask What aspects of logging to report (ignored) | |
75 */ | |
76 GR2_API bool graphite_start_logging(FILE * logFile, GrLogMask mask); //may not do anthing if disabled in the implementation of the engine. | |
77 | |
78 /** Stop logging to a FILE object. | |
79 * This function is deprecated as of 1.2.0, use the _face versions instead. | |
80 */ | |
81 GR2_API void graphite_stop_logging(); | |
82 | |
83 #ifdef __cplusplus | |
84 } | |
85 #endif |