创建一个没有附加时间字符串的Google日志文件

时间:2016-09-22 17:29:02

标签: c++ logging glog

我想创建一个“foobar.log”形式的简单日志文件,而不附加time_pid_string。这适用于Windows上的MSVC ++。

我试过了

google::SetLogDestination(google::INFO, "/lti/ImageProcessing/Backbone/logs/foobar.log");
google::InitGoogleLogging("");

但这会产生一个“foobar.logyyyymmdd-mmmmm.nnnn”形式的日志文件。

有什么建议吗?

1 个答案:

答案 0 :(得分:2)

No, you can't.

Google log is a corporate library. It is intended for having uniform logging across a corporate infraestructure. They want their tools to generate logs in an uniform way, and reduce uncertainity. Therefore, they give very limited options.

Outside Google it is, in my opinion, of rather limited use.