mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-13 04:36:57 +00:00
Import Strong Logger & Config System
This commit is contained in:
parent
92d4e7a8d3
commit
014b236228
48 changed files with 3281 additions and 734 deletions
37
core/Base/Logging/Backend.h
Normal file
37
core/Base/Logging/Backend.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
// Copyright 2025 Xenon Emulator Project. All rights reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string_view>
|
||||
#include <filesystem>
|
||||
|
||||
#include "Base/PathUtil.h"
|
||||
|
||||
#include "Filter.h"
|
||||
|
||||
namespace Base {
|
||||
namespace Log {
|
||||
|
||||
class Filter;
|
||||
|
||||
/// Cleans up logs from previous days, and any logs within the desired limit
|
||||
void CleanupOldLogs(const std::string_view &logFileBase, const fs::path &logDir, const u16 logLimit = 50);
|
||||
|
||||
/// Initializes the logging system
|
||||
void Initialize(const std::string_view &logFile = {});
|
||||
|
||||
bool IsActive();
|
||||
|
||||
/// Starts the logging threads
|
||||
void Start();
|
||||
|
||||
/// Explictily stops the logger thread and flushes the buffers
|
||||
void Stop();
|
||||
|
||||
/// The global filter will prevent any messages from even being processed if they are filtered
|
||||
void SetGlobalFilter(const Filter &filter);
|
||||
|
||||
void SetColorConsoleBackendEnabled(bool enabled);
|
||||
|
||||
} // namespace Log
|
||||
} // namespace Base
|
||||
Loading…
Add table
Add a link
Reference in a new issue