Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
FileSink.ixx File Reference

File-based logging sink for the Mila logging infrastructure. More...

#include <fstream>
#include <string>
#include <string_view>
#include <source_location>
#include <format>
#include <chrono>
#include <mutex>
#include <ctime>
#include <iomanip>
#include <filesystem>
#include <stdexcept>
import Logging.Logger;

Classes

class  Mila::Logging::FileSink
 Thread-safe logging sink that writes formatted records to a file. More...

Namespaces

namespace  Mila
 Mila main API namespace.
namespace  Mila::Logging

Detailed Description

File-based logging sink for the Mila logging infrastructure.

Writes formatted log records to a file, truncating on open so each process run starts with a clean log. Intended for server deployments (e.g. the FastAPI inference server) where the process standard streams are owned by the host and are not available for library output.

Note
Log file rollover (size-based rotation) is not yet implemented but the design intentionally isolates the open/write/flush responsibilities to make a future RolloverFileSink straightforward to derive or compose.