Rob Pike
unread,Aug 22, 2013, 8:19:08 PM8/22/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to David Chung, golan...@googlegroups.com
Don't log in init. You should avoid I/O during initialization in any case.
As the docs make clear, glog is just an export of a Google-internal
package. It's there because many people have asked for "leveled"
logging and the package shows one efficient way to provide it; the
public packages I've seen provide no way to avoid evaluating the
arguments to the logging call. Plus it's got a couple of nice
features, like -vmodule. And it's thoroughly tested, thread-safe, and
robust, and does things like file rollover at midnight. It's
production-ready.
But the package is designed for Google, and in particular to match in
minute detail the external behavior (files, flags, etc.) of an extant
C++ logging package. It's unlikely to be a perfect fit for just about
anyone else, although it's quite usable.
The package is what it is, and it will evolve only as the internal
Google package evolves.
If you want something different, it's open source and you are free to
take the source or its ideas and provide an alternative. As I've said
before, I hope someone will.
-rob