henrywen2011 / google-glog

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

Custom logger callback #109

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm wondering, if it is possible to implement custom logger callback?

I want to handle where logs will be written manually. For example, I want to be 
able to write logs to the remote host. Of course I can modify glog source code 
and replace all fprintf's with socket write, but I want a nicer solution.

Original issue reported on code.google.com by Van...@gmail.com on 11 Jan 2012 at 12:26

GoogleCodeExporter commented 8 years ago
BTW, how can I contribute source code?

Original comment by Van...@gmail.com on 11 Jan 2012 at 12:31

GoogleCodeExporter commented 8 years ago
I think you should be able to use LogSink. Maybe you can check the comments in 
logging.h and logging_unittest.cc.

There are no guideline for the contributors of glog. Please choose your 
favorite way. You can attach a patches to this issue trackers, you can send 
patches to the google group, or you can use http://codereview.appspot.com/, etc.

Original comment by shinichi...@gmail.com on 12 Jan 2012 at 7:25