Photon 1.0.0
Loading...
Searching...
No Matches
tweakme.h
Go to the documentation of this file.
1// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
2// Distributed under the MIT License (http://opensource.org/licenses/MIT)
3
4#pragma once
5
7//
8// Edit this file to squeeze more performance, and to customize supported
9// features
10//
12
14// Under Linux, the much faster CLOCK_REALTIME_COARSE clock can be used.
15// This clock is less accurate - can be off by dozens of millis - depending on
16// the kernel HZ.
17// Uncomment to use it instead of the regular clock.
18//
19// #define SPDLOG_CLOCK_COARSE
21
23// Uncomment if source location logging is not needed.
24// This will prevent spdlog from using __FILE__, __LINE__ and SPDLOG_FUNCTION
25//
26// #define SPDLOG_NO_SOURCE_LOC
28
30// Uncomment if thread id logging is not needed (i.e. no %t in the log pattern).
31// This will prevent spdlog from querying the thread id on each log call.
32//
33// WARNING: If the log pattern contains thread id (i.e, %t) while this flag is
34// on, zero will be logged as thread id.
35//
36// #define SPDLOG_NO_THREAD_ID
38
40// Uncomment to prevent spdlog from using thread local storage.
41//
42// WARNING: if your program forks, UNCOMMENT this flag to prevent undefined
43// thread ids in the children logs.
44//
45// #define SPDLOG_NO_TLS
47
49// Uncomment to avoid spdlog's usage of atomic log levels
50// Use only if your code never modifies a logger's log levels concurrently by
51// different threads.
52//
53// #define SPDLOG_NO_ATOMIC_LEVELS
55
57// Uncomment to enable usage of wchar_t for file names on Windows.
58//
59// #define SPDLOG_WCHAR_FILENAMES
61
63// Uncomment to override default eol ("\n" or "\r\n" under Linux/Windows)
64//
65// #define SPDLOG_EOL ";-)\n"
67
69// Uncomment to override default folder separators ("/" or "\\/" under
70// Linux/Windows). Each character in the string is treated as a different
71// separator.
72//
73// #define SPDLOG_FOLDER_SEPS "\\"
75
77// Uncomment to use your own copy of the fmt library instead of spdlog's copy.
78// In this case spdlog will try to include <fmt/format.h> so set your -I flag
79// accordingly.
80//
81// #define SPDLOG_FMT_EXTERNAL
83
85// Uncomment to use C++20 std::format instead of fmt.
86//
87// #define SPDLOG_USE_STD_FORMAT
89
91// Uncomment to enable wchar_t support (convert to utf8)
92//
93// #define SPDLOG_WCHAR_TO_UTF8_SUPPORT
95
97// Uncomment to prevent child processes from inheriting log file descriptors
98//
99// #define SPDLOG_PREVENT_CHILD_FD
101
103// Uncomment to customize level names (e.g. "MY TRACE")
104//
105// #define SPDLOG_LEVEL_NAMES { "MY TRACE", "MY DEBUG", "MY INFO", "MY WARNING", "MY ERROR", "MY CRITICAL", "OFF" }
107
109// Uncomment to customize short level names (e.g. "MT")
110// These can be longer than one character.
111//
112// #define SPDLOG_SHORT_LEVEL_NAMES { "T", "D", "I", "W", "E", "C", "O" }
114
116// Uncomment to disable default logger creation.
117// This might save some (very) small initialization time if no default logger is needed.
118//
119// #define SPDLOG_DISABLE_DEFAULT_LOGGER
121
123// Uncomment and set to compile time level with zero cost (default is INFO).
124// Macros like SPDLOG_DEBUG(..), SPDLOG_INFO(..) will expand to empty statements if not enabled
125//
126// #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_INFO
128
130// Uncomment (and change if desired) macro to use for function names.
131// This is compiler dependent.
132// __PRETTY_FUNCTION__ might be nicer in clang/gcc, and __FUNCTION__ in msvc.
133// Defaults to __FUNCTION__ (should work on all compilers) if not defined.
134//
135// #ifdef __PRETTY_FUNCTION__
136// # define SPDLOG_FUNCTION __PRETTY_FUNCTION__
137// #else
138// # define SPDLOG_FUNCTION __FUNCTION__
139// #endif