shizunge / endlessh-go

A golang implementation of endlessh exporting Prometheus metrics, visualized by a Grafana dashboard.
GNU General Public License v3.0
951 stars 28 forks source link

Usage of glog flags #84

Closed FoxxMD closed 8 months ago

FoxxMD commented 8 months ago

I see that endlessh-go is using glog for logging along with gflags (I think?) to pass options as args. Some of endlessh-go's args are pulled directly from logging.cc but when I try to use flags not listed, timestamp_in_logfile_name and max_log_size, I get an error.

flag provided but not defined: -max_log_size
Usage of /endlessh 
  -alsologtostderr
...

I don't see where in endlessh-go's code where the logging flags are defined... Would it be possible to use these additional flags? I'm try to configure basic log rotation. Thanks!

shizunge commented 8 months ago

./endlessh-go --help should list all the flags

We use https://github.com/golang/glog, not https://github.com/google/glog, the later one is for c++.