bux API Reference
1.12.6
Static library of whatever are seen required in general purpose but not directly supported from Modern C++. Or whatever reusable originated from my side projects.
Toggle main menu visibility
Loading...
Searching...
No Matches
test/smoke_filelog.cpp
//#define TURN_OFF_LOGGER_
//#define LOGGER_USE_LOCAL_TIME_ false
#include <
bux/Logger.h
>
// DEF_LOGGER_FILE()
#include <fstream>
// std::ofstream
DEF_LOGGER_FILE
(
"log/test.log"
,
LL_INFO
)
// Folder `log/` has to exist in before execution
int
main()
{
#ifndef TURN_OFF_LOGGER_
if
(
bux::C_UseLog
u{
bux::logger
()})
*u <<std::boolalpha <<
"LOGGER_USE_LOCAL_TIME_: "
<<
LOGGER_USE_LOCAL_TIME_
<<
"\n"
;
#endif
LOG
(
LL_FATAL
,
"Hello fatal"
);
FUNLOG
;
LOG
(
LL_ERROR
,
"Hello error"
);
LOG
(
LL_WARNING
,
"Hello warning"
);
FUNLOGX
(
"Inner"
);
LOG
(
LL_INFO
,
"Hello info"
);
LOG
(
LL_VERBOSE
,
"Hello verbose"
);
}
LL_WARNING
@ LL_WARNING
Situation that should be warned but should not have sabotaged anything already.
Definition
LogLevel.h:12
LL_ERROR
@ LL_ERROR
Error not serious enough that the program can continue to run.
Definition
LogLevel.h:11
LL_INFO
@ LL_INFO
Information worth mentioning about the current status, be it normal or abnormal.
Definition
LogLevel.h:13
LL_VERBOSE
@ LL_VERBOSE
More detailed or advanced information probably considered too much by some.
Definition
LogLevel.h:15
LL_FATAL
@ LL_FATAL
Error serious enough that the program should shut down immediately after reporting this.
Definition
LogLevel.h:10
Logger.h
Summary
FUNLOG
#define FUNLOG
Definition
Logger.h:159
FUNLOGX
#define FUNLOGX(fmtStr,...)
Definition
Logger.h:160
LOGGER_USE_LOCAL_TIME_
#define LOGGER_USE_LOCAL_TIME_
Definition
Logger.h:84
LOG
#define LOG(ll, fmtStr,...)
Definition
Logger.h:80
DEF_LOGGER_FILE
#define DEF_LOGGER_FILE(path,...)
Definition
Logger.h:111
bux::C_UseLog
Definition
SyncLog.h:207
bux::logger
I_SyncLog & logger()
Definition
Logger.cpp:20
Generated by
1.18.0