v0.3.0 API Reference
LogSink.h
1//
2// LogSink.h
3// avara3d
4//
5// Created by Morgan Davis on 11/9/23.
6// Copyright © 2026 Morgan K Davis. All rights reserved.
7//
8
9#ifndef AVARA3D_LOG_SINK_LOGSINK_H
10#define AVARA3D_LOG_SINK_LOGSINK_H
11
12#include <string>
13
14#include "a3d/log/Log.h"
15
16namespace a3d::log {
17
19class LogSink {
20
21public:
22 // [Public Lifecycle Functions]
23
24 virtual ~LogSink() = 0;
25
26 // [Public Member Functions]
27
29 virtual void write(const std::string& output, Level level) = 0;
30
32 virtual void flush();
33};
34
35} // namespace a3d::log
36
37#endif // AVARA3D_LOG_SINK_LOGSINK_H
Interface for destinations that receive formatted Log output.
Definition: LogSink.h:19
virtual void flush()
Flushes buffered sink output; the base implementation does nothing.
virtual void write(const std::string &output, Level level)=0
Writes already-formatted output associated with level.