2024-02-16 00:37:18 +04:00
|
|
|
#ifndef STORM_LOG_HPP
|
|
|
|
|
#define STORM_LOG_HPP
|
|
|
|
|
|
2024-02-18 15:31:21 +04:00
|
|
|
#include <cstdarg>
|
2024-02-20 00:14:49 +04:00
|
|
|
#include <cstdint>
|
2024-02-18 15:31:21 +04:00
|
|
|
|
2024-02-21 01:18:06 +04:00
|
|
|
#include "storm/Handle.hpp"
|
2024-02-16 00:37:18 +04:00
|
|
|
#include "storm/String.hpp"
|
|
|
|
|
|
2024-09-07 12:26:06 -04:00
|
|
|
#define STORM_LOG_FLAG_DEFAULT 0 // Create or open log file with first SLogWrite() call
|
|
|
|
|
#define STORM_LOG_FLAG_OPEN_FILE 1 // Create or open log file with SLogCreate()
|
|
|
|
|
#define STORM_LOG_FLAG_NO_FILE 2 // Don't use log file (use OutputDebugString or console only)
|
|
|
|
|
#define STORM_LOG_FLAG_APPEND 4 // Don't truncate existing log file
|
2024-02-20 00:14:49 +04:00
|
|
|
|
2024-02-16 00:37:18 +04:00
|
|
|
DECLARE_STRICT_HANDLE(HSLOG);
|
|
|
|
|
DECLARE_STRICT_HANDLE(HLOCKEDLOG);
|
|
|
|
|
|
2024-02-18 01:49:12 +04:00
|
|
|
void SLogInitialize();
|
|
|
|
|
int SLogIsInitialized();
|
|
|
|
|
void SLogDestroy();
|
|
|
|
|
int SLogCreate(const char* filename, uint32_t flags, HSLOG* log);
|
|
|
|
|
void SLogClose(HSLOG log);
|
|
|
|
|
void SLogFlush(HSLOG log);
|
|
|
|
|
void SLogFlushAll();
|
|
|
|
|
void SLogGetDefaultDirectory(char* dirname, size_t dirnamesize);
|
|
|
|
|
void SLogSetDefaultDirectory(const char* dirname);
|
|
|
|
|
int32_t SLogSetAbsIndent(HSLOG log, int32_t indent);
|
|
|
|
|
int32_t SLogSetIndent(HSLOG log, int32_t deltaIndent);
|
|
|
|
|
void SLogVWrite(HSLOG log, const char* format, va_list arglist);
|
|
|
|
|
void SLogWrite(HSLOG log, const char* format, ...);
|
|
|
|
|
|
2024-02-16 00:37:18 +04:00
|
|
|
#endif
|