SHA256
.
This commit is contained in:
@@ -7,8 +7,7 @@
|
|||||||
|
|
||||||
#include <featherlog/log_level.hpp>
|
#include <featherlog/log_level.hpp>
|
||||||
|
|
||||||
namespace flog
|
namespace flog {
|
||||||
{
|
|
||||||
struct LogMessage {
|
struct LogMessage {
|
||||||
std::chrono::system_clock::time_point timestamp;
|
std::chrono::system_clock::time_point timestamp;
|
||||||
LogLevel level;
|
LogLevel level;
|
||||||
@@ -17,4 +16,4 @@ namespace flog
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -7,17 +7,15 @@
|
|||||||
#include <featherlog/log_message.hpp>
|
#include <featherlog/log_message.hpp>
|
||||||
#include <featherlog/flog_definitions.h>
|
#include <featherlog/flog_definitions.h>
|
||||||
|
|
||||||
namespace flog
|
namespace flog {
|
||||||
{
|
class FLOG_API LogOutputter {
|
||||||
class FLOG_API LogOutputter
|
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
virtual ~LogOutputter() = default;
|
virtual ~LogOutputter() = default;
|
||||||
|
|
||||||
std::unique_ptr<LogFormatter> FLOG_CALL set_formatter(const std::unique_ptr<LogFormatter>& formatter);
|
std::unique_ptr<LogFormatter> FLOG_CALL set_formatter(const std::unique_ptr<LogFormatter> &formatter);
|
||||||
[[nodiscard]] const std::unique_ptr<LogFormatter>& FLOG_CALL get_formatter() const;
|
[[nodiscard]] const std::unique_ptr<LogFormatter> & FLOG_CALL get_formatter() const;
|
||||||
|
|
||||||
virtual void FLOG_CALL write(const LogMessage& message) = 0;
|
virtual void FLOG_CALL write(const LogMessage &message) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::unique_ptr<LogFormatter> m_logFormatter;
|
std::unique_ptr<LogFormatter> m_logFormatter;
|
||||||
|
|||||||
@@ -7,24 +7,22 @@
|
|||||||
|
|
||||||
#include <featherlog/flog_definitions.h>
|
#include <featherlog/flog_definitions.h>
|
||||||
|
|
||||||
namespace flog
|
namespace flog {
|
||||||
{
|
|
||||||
class LoggerManager;
|
class LoggerManager;
|
||||||
|
|
||||||
class FLOG_API Logger
|
class FLOG_API Logger {
|
||||||
{
|
|
||||||
friend class LogManager;
|
friend class LogManager;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~Logger() = default;
|
~Logger() = default;
|
||||||
|
|
||||||
template <typename... Args>
|
template<typename... Args>
|
||||||
void FLOG_CALL info(std::format_string<Args...> fmt, Args&&... args,
|
void FLOG_CALL info(std::format_string<Args...> fmt, Args &&... args,
|
||||||
std::source_location loc = std::source_location::current());
|
std::source_location loc = std::source_location::current());
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Logger(std::string name, const std::weak_ptr<LogManager> &manager) noexcept :
|
Logger(std::string name, const std::weak_ptr<LogManager> &manager) noexcept : m_name(std::move(name)),
|
||||||
m_name(std::move(name)), m_logManager(manager)
|
m_logManager(manager)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
|
|||||||
Reference in New Issue
Block a user