Open GoogleCodeExporter opened 8 years ago
InitGoogleLogging should really be part of the application. Libraries are free
to use the LOG macros but they can't make assumptions about how the user wants
to initialize logging. I believe InitGoogleLogging is meant to be called in the
application 'main' (or similar)
Original comment by diwakerg...@gmail.com
on 15 Mar 2012 at 9:04
Hm... what about dynamic loading?
I want to use logging in an NPAPI plugin (it is loaded dynamically by a
browser).
The problem is that I can't make an assumption that browser will call
InitGoogleLogging (I think it doesn't. I even can't be sure what it links to
glog). And if I develop another plugin, I want to be sure that I called init
only once.
Can I live without initialization?
Hm... What I can do is to link a plugin with glog statically and initialize
glog when a browser calls NP_Initialize. But then each plugin will have its own
glog copy. And if a browser rendering engine also links to glog, I might have a
problem.
> I believe InitGoogleLogging is meant to be called in the application 'main'
(or similar)
So a library must export this symbol? Or an application should link to glog?
Original comment by Van...@gmail.com
on 15 Mar 2012 at 9:28
Even if I link glog statically, I'll still have one InitGoogleLogging symbol :(
So, won't glog crash if I call init multiple times?
Original comment by Van...@gmail.com
on 9 Jul 2012 at 11:57
Could glog expose a function "IsGoogleLoggingInitialized()"?
Original comment by Van...@gmail.com
on 9 Jul 2012 at 3:02
Original issue reported on code.google.com by
Van...@gmail.com
on 23 Jan 2012 at 10:36