Search code examples
c++loggingglog

Create a Google Log File without the time string appended


I want to create a simple logfile of the form "foobar.log" without the time_pid_string being appended. This is for MSVC++ on Windows.

I have tried

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

but this results in a log file of the form "foobar.logyyyymmdd-mmmmm.nnnn".

Any suggestions?


Solution

  • 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.