I am trying to log my info and error logs into the log/dir directory in my project instead of writing it to the stderr.I tried the solution given here:How do I set the log directory of glog from code but this isn't creating log files in my directory.....
This is my code
func init() {
myDir, _ := os.Getwd()
flag.Set("logtostderr", "true")
flag.Set("log_dir", myDir+"/log/dir")
flag.Parse()
//Some other stuff
}