SHA256
.
This commit is contained in:
+9
-8
@@ -10,13 +10,13 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/shared")
|
||||
|
||||
# 定义源文件
|
||||
set(${PROJECT_NAME}_SOURCES
|
||||
include/log_manager.hpp
|
||||
include/log_outputter.hpp
|
||||
include/logger.hpp
|
||||
include/log_formatter.hpp
|
||||
include/log_level.hpp
|
||||
include/log_message.hpp
|
||||
src/featherlog/log_manager.cpp)
|
||||
include/featherlog/log_manager.hpp
|
||||
include/featherlog/log_outputter.hpp
|
||||
include/featherlog/logger.hpp
|
||||
include/featherlog/log_formatter.hpp
|
||||
include/featherlog/log_level.hpp
|
||||
include/featherlog/log_message.hpp
|
||||
src/log_manager.cpp)
|
||||
|
||||
# 生成静态库
|
||||
add_library(${PROJECT_NAME}_static STATIC ${${PROJECT_NAME}_SOURCES})
|
||||
@@ -29,7 +29,8 @@ add_compile_definitions(FLOG_DLL_MODE)
|
||||
add_compile_definitions(FLOG_BUILDING_DLL)
|
||||
|
||||
# 生成动态库
|
||||
add_library(${PROJECT_NAME}_shared SHARED ${${PROJECT_NAME}_SOURCES})
|
||||
add_library(${PROJECT_NAME}_shared SHARED ${${PROJECT_NAME}_SOURCES}
|
||||
include/featherlog/flog_definitions.h)
|
||||
target_include_directories(${PROJECT_NAME}_shared PUBLIC include)
|
||||
set_target_properties(${PROJECT_NAME}_shared PROPERTIES
|
||||
OUTPUT_NAME ${PROJECT_NAME}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../../include/log_manager.hpp"
|
||||
#include "../include/featherlog/log_manager.hpp"
|
||||
|
||||
namespace flog
|
||||
{
|
||||
Reference in New Issue
Block a user