A library providing generic API for messages logging across different platforms.
See the documentation
- Logging to file, stdout
- Logging levels (fatal - trace)
- Log file rotation
- Multithreading safety
- C and C++ implementations
void loggerExampleCPP()
{
logy::Logger logger("logs", INFO_LOG_LEVEL);
int someValue = 123;
logger.log(INFO_LOG_LEVEL, "Logged value: %d", someValue);
}
void loggerExampleC()
{
Logger logger;
LogyResult logyResult = createLogger("logs", INFO_LOG_LEVEL, true, 0.0, &logger);
if (logyResult != SUCCESS_LOGY_RESULT) abort();
int someValue = 123;
logMessage(logger, INFO_LOG_LEVEL, "Logged value: %d", someValue);
destroyLogger(logger);
}
- Windows (10/11)
- Ubuntu (22.04/24.04)
- macOS (14/15)
This list includes only those systems on which functionality testing is conducted. However, you can also compile it under any other Linux distribution or operating system.
- C99 compiler
- C++17 compiler (optional)
- Git 2.30+
- CMake 3.16+
Use building instructions to install all required tools and libraries.
Name | Description | Default value |
---|---|---|
LOGY_BUILD_SHARED | Build Logy shared library | ON |
Name | Description | Windows | macOS | Linux |
---|---|---|---|---|
logy-static | Static Logy library | .lib |
.a |
.a |
logy-shared | Dynamic Logy library | .dll |
.dylib |
.so |
git clone --recursive https://github.com/cfnptr/logy
- Windows:
./scripts/build-release.bat
- macOS / Ubuntu:
./scripts/build-release.sh