LogWrite
- Function
- October 8, 2025
Table of Contents
LogWrite
LogWriteDescription
Core log message generation function
Parameters
| Name | Direction | Description |
|---|---|---|
type | in | Severity level of message |
tag | in | Source identifier (typically function name) |
line | in | Source line number |
msg | in | Constant string to be printed |
Success
Message formatted and written to log output
Failure
Message silently dropped (output not guaranteed)
Usage example (Cross-references)
- In
Log.c:111:
}
void LogWrite(LogMessageType type, const char *tag, int line, const char *msg) {
if (!msg) {
return;
- In
Log.h:36:
Str m_ = StrInit(); \
StrWriteFmt(&m_, __VA_ARGS__); \
LogWrite(LOG_MESSAGE_TYPE_FATAL, __func__, __LINE__, m_.data); \
StrDeinit(&m_); \
SysAbort(); \
- In
Log.h:55:
Str m_ = StrInit(); \
StrWriteFmt(&m_, __VA_ARGS__); \
LogWrite(LOG_MESSAGE_TYPE_ERROR, __func__, __LINE__, m_.data); \
StrDeinit(&m_); \
} while (0)
- In
Log.h:73:
Str m_ = StrInit(); \
StrWriteFmt(&m_, __VA_ARGS__); \
LogWrite(LOG_MESSAGE_TYPE_INFO, __func__, __LINE__, m_.data); \
StrDeinit(&m_); \
} while (0)
- In
Log.h:99:
StrWriteFmt(&m_, " : {}", syserr_); \
}); \
LogWrite(LOG_MESSAGE_TYPE_FATAL, __func__, __LINE__, m_.data); \
StrDeinit(&m_); \
SysAbort(); \
- In
Log.h:126:
StrWriteFmt(&m_, " : {}", syserr_); \
}); \
LogWrite(LOG_MESSAGE_TYPE_ERROR, __func__, __LINE__, m_.data); \
StrDeinit(&m_); \
} while (0)
- In
Log.h:152:
StrWriteFmt(&m_, " : {}", syserr_); \
}); \
LogWrite(LOG_MESSAGE_TYPE_INFO, __func__, __LINE__, m_.data); \
StrDeinit(&m_); \
} while (0)