MengRao / fmtlog

fmtlog is a performant fmtlib-style logging library with latency in nanoseconds.
MIT License
795 stars 121 forks source link

fmtlog not compiling with the latest fmtlib (9.1.0) #50

Closed matthijs closed 2 years ago

matthijs commented 2 years ago

I've upgraded fmtlib in my project to 9.1.0 but now fmtlog doesnt compile anymore:

See compile error:

/project/fmtlog/fmtlog.h:101:28: error: expected ';' at end of declaration list
  static void preallocate() FMT_NOEXCEPT;
                           ^
                           ;
/project/fmtlog/fmtlog.h:117:40: error: expected ';' at end of declaration list
  static void setFlushDelay(int64_t ns) FMT_NOEXCEPT;
                                       ^
                                       ;
/project/fmtlog/fmtlog.h:120:46: error: expected ';' at end of declaration list
  static void flushOn(LogLevel flushLogLevel) FMT_NOEXCEPT;
                                             ^
                                             ;
/project/fmtlog/fmtlog.h:123:46: error: expected ';' at end of declaration list
  static void setFlushBufSize(uint32_t bytes) FMT_NOEXCEPT;
                                             ^
                                             ;
/project/fmtlog/fmtlog.h:139:59: error: expected ';' at end of declaration list
  static void setLogCB(LogCBFn cb, LogLevel minCBLogLevel) FMT_NOEXCEPT;
                                                          ^
                                                          ;
/project/fmtlog/fmtlog.h:142:61: error: expected ';' at end of declaration list
  static void setLogQFullCB(LogQFullCBFn cb, void* userData) FMT_NOEXCEPT;
                                                            ^
                                                            ;
/project/fmtlog/fmtlog.h:146:29: error: expected ';' at end of declaration list
  static void closeLogFile() FMT_NOEXCEPT;
                            ^
                            ;
/project/fmtlog/fmtlog.h:152:46: error: expected ';' at end of declaration list
  static void setThreadName(const char* name) FMT_NOEXCEPT;
                                             ^
                                             ;
/project/fmtlog/fmtlog.h:155:52: error: expected ';' at end of declaration list
  static inline void setLogLevel(LogLevel logLevel) FMT_NOEXCEPT;
                                                   ^
                                                   ;
/project/fmtlog/fmtlog.h:158:39: error: expected ';' at end of declaration list
  static inline LogLevel getLogLevel() FMT_NOEXCEPT;
                                      ^
                                      ;
/project/fmtlog/fmtlog.h:161:54: error: expected ';' at end of declaration list
  static inline bool checkLogLevel(LogLevel logLevel) FMT_NOEXCEPT;
                                                     ^
                                                     ;
/project/fmtlog/fmtlog.h:165:65: error: expected ';' at end of declaration list
  static void startPollingThread(int64_t pollInterval = 1000000) FMT_NOEXCEPT;
                                                                ^
                                                                ;
/project/fmtlog/fmtlog.h:168:34: error: expected ';' at end of declaration list
  static void stopPollingThread() FMT_NOEXCEPT;
                                 ^
                                 ;
/project/fmtlog/fmtlog.h:183:39: error: expected ';' at end of declaration list
    MsgHeader* allocMsg(uint32_t size) FMT_NOEXCEPT;
                                      ^
                                      ;
/project/fmtlog/fmtlog.h:377:58: error: expected ';' at end of declaration list
                              fmt::string_view fmtString) FMT_NOEXCEPT;
                                                         ^
                                                         ;
/project/fmtlog/fmtlog.h:385:87: error: expected ';' at end of declaration list
  static typename SPSCVarQueueOPT::MsgHeader* allocMsg(uint32_t size, bool logQFullCB) FMT_NOEXCEPT;
                                                                                      ^
                                                                                      ;
/project/fmtlog/fmtlog.h:671:20: error: expected ';' at end of declaration list
    Args&&... args) FMT_NOEXCEPT {
                   ^
                   ;
/project/fmtlog/fmtlog.h:732:25: error: out-of-line declaration of a member must be a definition [-Wout-of-line-declaration]
inline void fmtlogT<_>::setLogLevel(LogLevel logLevel) FMT_NOEXCEPT {
            ~~~~~~~~~~~~^
/project/fmtlog/fmtlog.h:732:55: error: expected ';' at end of declaration
inline void fmtlogT<_>::setLogLevel(LogLevel logLevel) FMT_NOEXCEPT {
                                                      ^
                                                      ;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
MengRao commented 2 years ago

fixed

matthijs commented 2 years ago

Thanks! I can confirm it works again correctly!