9 #ifndef INCLUDE_MLCLIENT_LOGGING_HPP_
10 #define INCLUDE_MLCLIENT_LOGGING_HPP_
12 #include <mlclient/mlclient.hpp>
20 #include <glog/logging.h>
41 #define LOG_DEBUG COMPACT_GOOGLE_LOG_ ## INFO.stream()
42 #define LOG_INFO COMPACT_GOOGLE_LOG_ ## INFO.stream()
43 #define LOG_ERROR COMPACT_GOOGLE_LOG_ ## ERROR.stream()
44 #define LOG_WARN COMPACT_GOOGLE_LOG_ ## WARN.stream()
45 #define LOG(lvl) COMPACT_GOOGLE_LOG_ ## INFO.stream()
49 template<
typename Ch,
typename Traits = std::
char_traits<Ch> >
50 struct basic_nullbuf : std::basic_streambuf<Ch, Traits> {
51 typedef std::basic_streambuf<Ch, Traits> base_type;
52 typedef typename base_type::int_type int_type;
53 typedef typename base_type::traits_type traits_type;
55 virtual int_type overflow(int_type c) {
56 return traits_type::not_eof(c);
61 MLCLIENT_API
typedef basic_nullbuf<char> nullbuf;
62 MLCLIENT_API
typedef basic_nullbuf<wchar_t> wnullbuf;
68 MLCLIENT_API
extern std::ostream cnull;
71 #define LOG(lvl) cnull
77 #define CLOG(lvl) LOG(lvl)
79 #define TIMED_FUNC(id) //
80 #define TIMED_SCOPE(id,scopename) //
81 #define ENTRANCE_LOG(a,b,c,d) //
82 #define DEBUG_ENTRANCE_LOG(a,b,c,d) //
116 void libraryLoggingInit();
LoggingConfiguration to use.
Definition: logging.hpp:98
bool toerr
Definition: logging.hpp:106
std::string level
The level. INFO or DEBUG strings.
Definition: logging.hpp:103
MLCLIENT_API void reconfigureLogging(int argc, const char *argv[])
Reconfigure logging from command line args.
MLCLIENT_API void reconfigureLoggingSettings(const LoggingConfiguration &config)
Reconfigures logging from a LoggingConfiguration struct.
std::string folder
The folder to log to.
Definition: logging.hpp:100
the namespace which wraps all Core Public C++ API classes.
Definition: Connection.hpp:36