OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4Log.h
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de/
5  * Copyright (c) 2009-2016, The OpenClonk Team and contributors
6  *
7  * Distributed under the terms of the ISC license; see accompanying file
8  * "COPYING" for details.
9  *
10  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
11  * See accompanying file "TRADEMARK" for details.
12  *
13  * To redistribute this file separately, substitute the full license texts
14  * for the above references.
15  */
16 
17 /* Log file handling */
18 
19 #ifndef INC_C4Log
20 #define INC_C4Log
21 
22 bool OpenLog();
23 bool OpenExtraLogs();
24 bool CloseLog();
25 
26 bool Log(const char *szMessage);
27 bool LogSilent(const char *szMessage);
28 bool LogF(const char *strMessage, ...) GNUC_FORMAT_ATTRIBUTE;
29 bool LogSilentF(const char *strMessage, ...) GNUC_FORMAT_ATTRIBUTE;
30 bool DebugLog(const char *strMessage);
31 bool DebugLogF(const char *strMessage ...) GNUC_FORMAT_ATTRIBUTE;
32 bool ShaderLog(const char *strMessage);
33 bool ShaderLogF(const char *strMessage ...) GNUC_FORMAT_ATTRIBUTE;
34 
35 bool LogFatal(const char *szMessage); // log message and store it as a fatal error
36 void ResetFatalError(); // clear any fatal error message
37 const char *GetFatalError(); // return message that was set as fatal error, if any
38 
39 size_t GetLogPos(); // get current log position;
40 bool GetLogSection(size_t iStart, size_t iLength, StdStrBuf &rsOut); // re-read log data from file
41 
42 // Used to print a backtrace after a crash
43 int GetLogFD();
44 
45 #endif
size_t GetLogPos()
Definition: C4Log.cpp:296
#define GNUC_FORMAT_ATTRIBUTE
int GetLogFD()
Definition: C4Log.cpp:116
bool ShaderLogF(const char *strMessage...) GNUC_FORMAT_ATTRIBUTE
Definition: C4Log.cpp:354
const char * GetFatalError()
Definition: C4Log.cpp:255
bool GetLogSection(size_t iStart, size_t iLength, StdStrBuf &rsOut)
Definition: C4Log.cpp:302
bool DebugLogF(const char *strMessage...) GNUC_FORMAT_ATTRIBUTE
Definition: C4Log.cpp:288
bool ShaderLog(const char *strMessage)
Definition: C4Log.cpp:341
bool OpenLog()
Definition: C4Log.cpp:48
bool LogFatal(const char *szMessage)
Definition: C4Log.cpp:237
void ResetFatalError()
Definition: C4Log.cpp:250
bool LogF(const char *strMessage,...) GNUC_FORMAT_ATTRIBUTE
Definition: C4Log.cpp:260
bool LogSilent(const char *szMessage)
Definition: C4Log.cpp:195
bool LogSilentF(const char *strMessage,...) GNUC_FORMAT_ATTRIBUTE
Definition: C4Log.cpp:270
bool OpenExtraLogs()
Definition: C4Log.cpp:83
bool DebugLog(const char *strMessage)
Definition: C4Log.cpp:280
bool CloseLog()
Definition: C4Log.cpp:107
bool Log(const char *szMessage)
Definition: C4Log.cpp:202