I try to write to file using >> as usual by for Go project, It does not work.
./main >> info.log or go run main.go >> info.log
I'm running as root and I've tried to change file permission to 755 but still noting in info.log. I've also tried ls >> ls.log It works fine.
So I think there is something wrong with my code. All I use are log.Println() and log.Printf()
My code runs on Ubuntu 12.04.5 LTS (GNU/Linux 3.13.0-32-generic x86_64)
Go's standard logger writes to stderr. You should either use 2> and 2>> and their friends in your shell scripts, or create your own logger that writes to stdout.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With