mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-15 17:27:57 +00:00
Compare commits
8 Commits
daaa025356
...
05ecad4263
Author | SHA1 | Date | |
---|---|---|---|
|
05ecad4263 | ||
|
4cdb159ccb | ||
|
fccb25586f | ||
|
ab2f3307eb | ||
|
db26a103d6 | ||
|
32902f79ad | ||
|
fab33dd230 | ||
|
6e763d2776 |
@ -15,18 +15,6 @@
|
||||
#include <type_traits>
|
||||
#include <functional>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX // prevent windows redefining min/max
|
||||
#endif
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef SPDLOG_COMPILED_LIB
|
||||
#undef SPDLOG_HEADER_ONLY
|
||||
#define SPDLOG_INLINE
|
||||
|
@ -23,16 +23,9 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX // prevent windows redefining min/max
|
||||
#endif
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <io.h> // _get_osfhandle and _isatty support
|
||||
#include <process.h> // _get_pid support
|
||||
#include <windows.h>
|
||||
#include <spdlog/details/windows_include.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <share.h>
|
||||
|
11
include/spdlog/details/windows_include.h
Normal file
11
include/spdlog/details/windows_include.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX // prevent windows redefining min/max
|
||||
#endif
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
@ -8,6 +8,7 @@
|
||||
#include <spdlog/details/null_mutex.h>
|
||||
#include <spdlog/sinks/base_sink.h>
|
||||
|
||||
#include <spdlog/details/windows_include.h>
|
||||
#include <winbase.h>
|
||||
|
||||
#include <mutex>
|
||||
|
@ -30,11 +30,12 @@ Windows Registry Editor Version 5.00
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <winbase.h>
|
||||
|
||||
#include <spdlog/details/null_mutex.h>
|
||||
#include <spdlog/sinks/base_sink.h>
|
||||
|
||||
#include <spdlog/details/windows_include.h>
|
||||
#include <winbase.h>
|
||||
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -12,6 +12,8 @@
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <array>
|
||||
|
||||
#include <spdlog/details/windows_include.h>
|
||||
#include <wincon.h>
|
||||
|
||||
namespace spdlog {
|
||||
|
@ -39,13 +39,11 @@ inline std::shared_ptr<spdlog::logger> create(std::string logger_name, SinkArgs
|
||||
// Initialize and register a logger,
|
||||
// formatter and flush level will be set according the global settings.
|
||||
//
|
||||
// NOTE:
|
||||
// Use this function when creating loggers manually.
|
||||
// Useful for initializing manually created loggers with the global settings.
|
||||
//
|
||||
// Example:
|
||||
// auto console_sink = std::make_shared<spdlog::sinks::stdout_sink_mt>();
|
||||
// auto console_logger = std::make_shared<spdlog::logger>("console_logger", console_sink);
|
||||
// spdlog::initialize_logger(console_logger);
|
||||
// auto mylogger = std::make_shared<spdlog::logger>("mylogger", ...);
|
||||
// spdlog::initialize_logger(mylogger);
|
||||
void initialize_logger(std::shared_ptr<logger> logger);
|
||||
|
||||
// Return an existing logger or nullptr if a logger with such name doesn't
|
||||
|
Loading…
Reference in New Issue
Block a user