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