-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change format of logger? for example time and verbose level name and etc #229
Comments
Hello : |
@xiaodongkirin your comment doesn't seem related to this issue, and you seem to be spamming all issues. |
@yoni386 I looked, and while I don't think you can supply a custom format string, it looks like you can set the |
I see. Thank you
On Tue, 15 Aug 2017 at 7:03 Andrew Schwartzmeyer ***@***.***> wrote:
@yoni386 <https://github.com/yoni386> I looked, and while I don't think
you can supply a custom format string, it looks like you can set the
log_prefix flag
<https://github.com/google/glog/blob/master/src/logging.cc#L1269> to
prepend some information.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#229 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ALrs2pGtEZ9CudbDb9FLglCZ_q9zw5krks5sYRiVgaJpZM4OzW8b>
.
--
Best Regards,
Yoni Shperling
|
Note log_prefix is true by default. Customizable format is unnecessary feature for Google (internal tools depend on this particular format) but I'm happy to accept a PR if someone make this customizable as long as the default code path is kept unchanged. |
#554 contains a possible way of adding support for this. |
As a workaround, we are currently disabling glog's prefix altogether by writing to the |
For example:
10-08-2017 15:30:25 [DEBUG] src/ilo/mod.:61 - Hosts to build: ["xxx-local"], total: 1
10-08-2017 15:30:25 [ERROR] src/ilo/ilo_builder/mod.rs:108 - Host: xxx-local Error Msg: [6] Couldn't resolve host name (Could not resolve host: xxx-local)
10-08-2017 15:30:25 [ERROR] src/ilo/mod.rs:73 - Host: xxx-local
10-08-2017 15:30:25 [DEBUG] src/ilo/mod.rs:79 - Total hosts were built:
The text was updated successfully, but these errors were encountered: