tweakme.h 6.2 KB

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