1
1
#include < glog/logging.h>
2
2
3
3
#include < filesystem>
4
+ #include < format>
4
5
5
6
auto main (int argc, char **argv) -> int
6
7
{
@@ -23,15 +24,15 @@ auto main(int argc, char **argv) -> int
23
24
24
25
std::string message (" Hello World" );
25
26
26
- LOG (INFO) << message;
27
- LOG (WARNING) << message;
28
- LOG (ERROR) << message;
29
- // LOG(FATAL) << message;
27
+ LOG (INFO) << std::format ( " {}, This is a info message" , message) ;
28
+ LOG (WARNING) << std::format ( " {}, This is a warning message" , message) ;
29
+ LOG (ERROR) << std::format ( " {}, This is a error message" , message) ;
30
+ // LOG(FATAL) << std::format("{}, This is a fatal message", message) ;
30
31
31
- DLOG (INFO) << message;
32
- DLOG (WARNING) << message;
33
- DLOG (ERROR) << message;
34
- // DLOG(FATAL) << message;
32
+ DLOG (INFO) << std::format ( " {}, This is a debug info message" , message) ;
33
+ DLOG (WARNING) << std::format ( " {}, This is a debug warning message" , message) ;
34
+ DLOG (ERROR) << std::format ( " {}, This is a debug error message" , message) ;
35
+ // DLOG(FATAL) << std::format("{}, This is a debug fatal message", message) ;
35
36
36
37
google::ShutdownGoogleLogging ();
37
38
return 0 ;
0 commit comments