Printing to the console.
More...
|
#define | CSM_LogError(pCategory, pFormat, ...) CSM_LogInfo(pCategory, "\v08" pFormat, __VA_ARGS__) |
| Log an error message to the console & to the log file (if one is open). More...
|
|
#define | CSM_LogWarn(pCategory, pFormat, ...) CSM_LogInfo(pCategory, "\v0B" pFormat, __VA_ARGS__) |
| Log a warning message to the console & to the log file (if one is open). More...
|
|
#define | CSM_LogErrorWithInfo(pCategory, pFormat, ...) __CSM__LogError(__FILE__, __LINE__, pCategory, pFormat, __VA_ARGS__) |
| Log an error message to the console & to the log file (if one is open). More...
|
|
#define | CSM_LogWarnWithInfo(pCategory, pFormat, ...) __CSM__LogWarn(__FILE__, __LINE__, pCategory, pFormat, __VA_ARGS__) |
| Log a warning message to the console & to the log file (if one is open). More...
|
|
|
CAVESTORY_MOD_API void | CSM_Log_EnableStackLines (bool bEnable) |
| Enable or disable StackLines. More...
|
|
CAVESTORY_MOD_API void | CSM_Log (const char *pFormat,...) |
| Log a message to the console. More...
|
|
CAVESTORY_MOD_API void | CSM_LogInfo (const char *pCategory, const char *pFormat,...) |
| Log a message to the console & to the log file (if one is open). More...
|
|
CAVESTORY_MOD_API void | CSM_LogColor (unsigned int iColor=0xFFFFFFFF) |
| Set the color of the console. More...
|
|
CAVESTORY_MOD_API void | __CSM__LogError (const char *pSourceFile, int iSourceLineNo, const char *pCategory, const char *pFormat,...) |
| Log an error message to the console & to the log file (if one is open). More...
|
|
CAVESTORY_MOD_API void | __CSM__LogWarn (const char *pSourceFile, int iSourceLineNo, const char *pCategory, const char *pFormat,...) |
| Log a warning message to the console & to the log file (if one is open). More...
|
|
CAVESTORY_MOD_API void | CSM_LogInfoNoNL (const char *pCategory, const char *pFormat,...) |
| Log a message to the console & to the log file (if one is open). More...
|
|
CAVESTORY_MOD_API void | CSM_Explode (int iErrorCode, const char *pErrorName, const char *pTitle="\\a{0} crashed!", const char *pMessage="The mod's DLL has crashed!", bool bGenerateCrashLog=true) |
| Display a crash screen. More...
|
|
Printing to the console.
Functions to print to the console with.
◆ CSM_LogError
#define CSM_LogError |
( |
|
pCategory, |
|
|
|
pFormat, |
|
|
|
... |
|
) |
| CSM_LogInfo(pCategory, "\v08" pFormat, __VA_ARGS__) |
Log an error message to the console & to the log file (if one is open).
- Parameters
-
pCategory | The category of the log message. |
pFormat | The format of the string. |
... | Extra formatting arguments. |
- Examples
- RenderPipeline.cpp.
◆ CSM_LogErrorWithInfo
#define CSM_LogErrorWithInfo |
( |
|
pCategory, |
|
|
|
pFormat, |
|
|
|
... |
|
) |
| __CSM__LogError(__FILE__, __LINE__, pCategory, pFormat, __VA_ARGS__) |
Log an error message to the console & to the log file (if one is open).
- Parameters
-
pCategory | The category of the log message. |
pFormat | The format of the string. |
... | Extra formatting arguments. |
◆ CSM_LogWarn
#define CSM_LogWarn |
( |
|
pCategory, |
|
|
|
pFormat, |
|
|
|
... |
|
) |
| CSM_LogInfo(pCategory, "\v0B" pFormat, __VA_ARGS__) |
Log a warning message to the console & to the log file (if one is open).
- Parameters
-
pCategory | The category of the log message. |
pFormat | The format of the string. |
... | Extra formatting arguments. |
◆ CSM_LogWarnWithInfo
#define CSM_LogWarnWithInfo |
( |
|
pCategory, |
|
|
|
pFormat, |
|
|
|
... |
|
) |
| __CSM__LogWarn(__FILE__, __LINE__, pCategory, pFormat, __VA_ARGS__) |
Log a warning message to the console & to the log file (if one is open).
- Parameters
-
pCategory | The category of the log message. |
pFormat | The format of the string. |
... | Extra formatting arguments. |
◆ __CSM__LogError()
CAVESTORY_MOD_API void __CSM__LogError |
( |
const char * |
pSourceFile, |
|
|
int |
iSourceLineNo, |
|
|
const char * |
pCategory, |
|
|
const char * |
pFormat, |
|
|
|
... |
|
) |
| |
Log an error message to the console & to the log file (if one is open).
- Parameters
-
pCategory | The category of the log message. |
pFormat | The format of the string. |
... | Extra formatting arguments. |
◆ __CSM__LogWarn()
CAVESTORY_MOD_API void __CSM__LogWarn |
( |
const char * |
pSourceFile, |
|
|
int |
iSourceLineNo, |
|
|
const char * |
pCategory, |
|
|
const char * |
pFormat, |
|
|
|
... |
|
) |
| |
Log a warning message to the console & to the log file (if one is open).
- Parameters
-
pCategory | The category of the log message. |
pFormat | The format of the string. |
... | Extra formatting arguments. |
◆ CSM_Explode()
CAVESTORY_MOD_API void CSM_Explode |
( |
int |
iErrorCode, |
|
|
const char * |
pErrorName, |
|
|
const char * |
pTitle = "\\a{0} crashed!" , |
|
|
const char * |
pMessage = "The mod's DLL has crashed!" , |
|
|
bool |
bGenerateCrashLog = true |
|
) |
| |
Display a crash screen.
- Parameters
-
iErrorCode | The error code to display alongside the error name. |
pErrorName | The name of the error (Ex. "MY_MOD_COULDNT_FIND_NPC"; Can be whatever you want). Max limit 32 characters. |
pTitle | The title message of the crash window. Can be a locale string (just start it with '#'). Uses the mod name as the first argument. |
pMessage | The crash message to be included with everything else. New lines are supported. Can be a locale string (just start it with '#'). |
bGenerateCrashLog | Whether or not to generate a crash log. |
- Note
- This sets your DLL to be unloaded the next main-thread game tick.
◆ CSM_Log()
Log a message to the console.
- Parameters
-
pFormat | The format of the string. |
... | Extra formatting arguments. |
◆ CSM_Log_EnableStackLines()
Enable or disable StackLines.
If this is enabled and CSM_LogInfo is called with the same exact message more than twice in a row, it will not re-echo it.
- Parameters
-
bEnable | Whether to enable or disable this feature. |
◆ CSM_LogColor()
Set the color of the console.
- Parameters
-
◆ CSM_LogInfo()
CAVESTORY_MOD_API void CSM_LogInfo |
( |
const char * |
pCategory, |
|
|
const char * |
pFormat, |
|
|
|
... |
|
) |
| |
Log a message to the console & to the log file (if one is open).
- Parameters
-
pCategory | The category of the log message. |
pFormat | The format of the string. |
... | Extra formatting arguments. |
◆ CSM_LogInfoNoNL()
CAVESTORY_MOD_API void CSM_LogInfoNoNL |
( |
const char * |
pCategory, |
|
|
const char * |
pFormat, |
|
|
|
... |
|
) |
| |
Log a message to the console & to the log file (if one is open).
No new line.
- Parameters
-
pCategory | The category of the log message. |
pFormat | The format of the string. |
... | Extra formatting arguments. |