zhangjl / google-glog

Automatically exported from code.google.com/p/google-glog
Other
0 stars 0 forks source link

No way to shutdown the logger #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create sample program using glog and the 'SYSLOG' macro
2. Run Valgrind on the resulting binary.

What is the expected output? What do you see instead?
expected: FILE DESCRIPTORS: 3 open at exit.
current result:
==27112== FILE DESCRIPTORS: 4 open at exit.
==27112== Open AF_UNIX socket 3: <unknown>
==27112==    at 0x35EE0DF727: socket (syscall-template.S:82)
==27112==    by 0x35EE0DA38B: openlog_internal (syslog.c:355)
==27112==    by 0x35EE0DA691: openlog (syslog.c:416)
==27112==    by 0x4C4FE27: google::LogMessage::SendToSyslogAndLog()
(logging.cc:1312)
==27112==    by 0x4C4EF9E: google::LogMessage::Flush() (logging.cc:1088)
==27112==    by 0x4C4F1A8: google::LogMessage::~LogMessage() (logging.cc:1055)
==27112==    by 0x400EF5: main (glogtest.cpp:28)

What version of the product are you using? On what operating system?
glog 0.3.0, Fedora 12, x86_64. Glog was built without gflags (too many
valgrind warnings/errors in gflags).

Please provide any additional information below.
I can find the call to openlog in the source, but no call to closelog.

The main problem is that it makes it hard to use valgrind with glog. Would
it be possible to add say ShutdownGoogleLogging in addition to
InitGoogleLogging?

Original issue reported on code.google.com by DGunchev on 15 Jan 2010 at 1:31

GoogleCodeExporter commented 9 years ago
Maybe something like...

Original comment by DGunchev on 15 Jan 2010 at 2:03

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for your patch! Could you sign our Individual Contributor License 
Agreement, 
please? We need to ask you to sign this to avoid any troubles. The process is 
just 
submitting an HTML form, and it shouldn't take your time so much.

http://code.google.com/legal/individual-cla-v1.0.html

Sorry for the latency...

Original comment by shinichi...@gmail.com on 27 May 2010 at 10:33

GoogleCodeExporter commented 9 years ago
Filled the form and waiting the next step. Anyway, you can use the patch under
whatever license you like :)

Original comment by DGunchev on 31 May 2010 at 3:16

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/google-glog/source/detail?r=88

Original comment by shinichi...@gmail.com on 10 Jan 2013 at 7:35