From 767b66c7c974877e994e6574705a623be3c14a08 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Thu, 12 Oct 2023 13:44:48 +0200 Subject: added logging utility functions (from sb/proto) (#469) these allow standalone programs to share much of the logging setup from zenserver --- src/zenutil/include/zenutil/logging.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/zenutil/include/zenutil/logging.h (limited to 'src/zenutil/include') 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 + +#include +#include + +////////////////////////////////////////////////////////////////////////// +// +// 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 -- cgit v1.2.3