mire787 / google-glog

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

change Glog configuration for stopping it to send the output in logfile anywhere. #47

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It is just a question than an issue.
I am new to glog...
>> I wanted to change Glog configuration for stopping it to send the output 
in logfile(The default output file gets generated at:
/tmp/<program name>.<hostname>.<user name>.log.<severity 
level>.<date>.<time>.<pid>, i wanted to stop this)

What is the expected output? What do you see instead?
No output INFO or WARNING generated anywhere, it should be nulified.

What version of the product are you using? On what operating system?
glog-0.3.0 on FreeBSD

Please suggest the way, how can i achieve the above?

Original issue reported on code.google.com by geeta.agichani@gmail.com on 10 May 2010 at 8:59

GoogleCodeExporter commented 8 years ago
Waiting for immediate help,.
Thanks

Original comment by geeta.agichani@gmail.com on 10 May 2010 at 9:00

GoogleCodeExporter commented 8 years ago
You can use minloglevel=2 to suppress INFO and WARNING.

http://google-glog.googlecode.com/svn/trunk/doc/glog.html#flags

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

GoogleCodeExporter commented 8 years ago
i checked by running config as: ./configure minloglevel=2, it doesn't workout 
for me.
still could see 2 files getting generated under /tmp:
-rw-r--r--  1 root  wheel    231 May 10 19:48 
app.INPE01697LT.apac.com.root.log.INFO.20100510-194816.4480
lrwxr-xr-x  1 root  wheel     79 May 10 19:48 app.INFO -> 
app.INPE01697LT.apac.com.root.log.INFO.20100510-194816.4480

please suggest any proper way, like changing in config, or passing some flags 
while 
installing glog, can i achieve the same (that is: no logs of any kind, should 
be 
generated by glog anywhr)

Original comment by geeta.agichani@gmail.com on 10 May 2010 at 2:23

GoogleCodeExporter commented 8 years ago
when i do: ./configure minloglevel=-1 it just suppresses the WARNING file but 
still i 
am getting INFO file.

Original comment by geeta.agichani@gmail.com on 10 May 2010 at 4:10

GoogleCodeExporter commented 8 years ago
Basically, my requirement is to: 
SUPPRESS 
INFO,WARNING, ERROR and FATAL (all kind of) messages/log file being generated 
under 
default directory (/tmp).

Original comment by geeta.agichani@gmail.com on 12 May 2010 at 12:02

GoogleCodeExporter commented 8 years ago
Additional requirement: I want :

1> all log files generated from glog locally, to be blocked (Instead of this, i 
am 
capturing this logs in my own file and wanted to keep it at centralized/server 
location... this feature is not provided by glog).

2> I want my logs to be generated at centralize location 
and it should not be like: 
if i am stopping/blocking glog to generate log files locally than it is 
blocking this 
logs generation at centralized/server location too.

Waiting For Quick Response!

Original comment by geeta.agichani@gmail.com on 12 May 2010 at 12:35

GoogleCodeExporter commented 8 years ago
Have you checked the document I pointed?

http://google-glog.googlecode.com/svn/trunk/doc/glog.html#flags

The minloglevel parameter isn't the parameter for configure. If you don't have 
gflags 
installed, you can use environment variable like

GLOG_minloglevel=4 ./your_app

or, if you have gflags installed, you can do

./your_app --minloglevel=4

If you want to change the directory where log files will be stored, you may be 
able 
to use GLOG_log_dir environment variable or --log_dir flag.

If you want to suppress logs by compile time switch, you can use 
GOOGLE_STRIP_LOG 
macro.

http://google-glog.googlecode.com/svn/trunk/doc/glog.html#strip

Original comment by shinichi...@gmail.com on 12 May 2010 at 12:45