diff options
| author | Stefan Boberg <[email protected]> | 2023-10-12 13:44:48 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-12 13:44:48 +0200 |
| commit | 767b66c7c974877e994e6574705a623be3c14a08 (patch) | |
| tree | f26653f0cb8ac028d717191e71d5f0a9e6fdfc4b /src/zenutil/include | |
| parent | skip lightweight GC if full GC is due soon (#467) (diff) | |
| download | zen-767b66c7c974877e994e6574705a623be3c14a08.tar.xz zen-767b66c7c974877e994e6574705a623be3c14a08.zip | |
added logging utility functions (from sb/proto) (#469)
these allow standalone programs to share much of the logging setup from zenserver
Diffstat (limited to 'src/zenutil/include')
| -rw-r--r-- | src/zenutil/include/zenutil/logging.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/zenutil/include/zenutil/logging.h b/src/zenutil/include/zenutil/logging.h new file mode 100644 index 000000000..6f408f512 --- /dev/null +++ b/src/zenutil/include/zenutil/logging.h @@ -0,0 +1,33 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include <zencore/logging.h> + +#include <filesystem> +#include <string> + +////////////////////////////////////////////////////////////////////////// +// +// Logging utilities +// +// These functions extend the basic logging functionality by setting up +// console and file logging, as well as colored output where available, +// for sharing across different executables +// + +namespace zen { + +struct LoggingOptions +{ + bool IsDebug = false; + bool IsVerbose = false; + bool IsTest = false; + std::filesystem::path AbsLogFile; // Absolute path to main log file + std::string LogId; +}; + +void InitializeLogging(const LoggingOptions& LoggingOptions); +void ShutdownLogging(); + +} // namespace zen |