This commit is contained in:
CupWater
2026-08-17 11:31:12 +08:00
parent c196ffb6d8
commit e99541c139
9 changed files with 51 additions and 19 deletions
+30
View File
@@ -0,0 +1,30 @@
#ifndef FEATHERLOG_FLOG_DEFINITIONS_H
#define FEATHERLOG_FLOG_DEFINITIONS_H
#ifndef FLOG_CALL
# define FLOG_CALL __stdcall
#endif
#ifndef FLOG_API
#if defined(__unix) || defined(__unix__)
#define FLOG_API
#elif defined(_WIN32) || defined(__WIN32__)
# ifdef FLOG_DLL_MODE
# ifdef FLOG_BUILDING_DLL
# define FLOG_API __declspec(dllexport)
# else
# define FLOG_API __declspec(dllimport)
# endif
# else
# define FLOG_API
# endif
#else
# error Unknow platform!
#endif
#endif
#endif
@@ -1,14 +1,17 @@
#ifndef FEATHERLOG_LOG_FORMATTER_HPP
#define FEATHERLOG_LOG_FORMATTER_HPP
#include <string>
#include <featherlog/flog_definitions.h>
namespace flog
{
class LogFormatter
class FLOG_API LogFormatter
{
public:
virtual ~LogFormatter() = default;
virtual std::string format() = 0;
virtual std::string FLOG_CALL format() = 0;
};
}
@@ -8,17 +8,15 @@
#include <unordered_map>
#include <vector>
#include "logger.hpp"
#include "log_formatter.hpp"
#include "log_level.hpp"
#include "log_message.hpp"
#include "log_outputter.hpp"
#include <featherlog/logger.hpp>
#include <featherlog/log_level.hpp>
#include <featherlog/log_message.hpp>
#include <featherlog/log_outputter.hpp>
#include <featherlog/flog_definitions.h>
namespace flog
{
class LogManager;
class LogManager : public std::enable_shared_from_this<LogManager>
class FLOG_API LogManager : public std::enable_shared_from_this<LogManager>
{
friend class LoggerCallback;