[go-nuts] Re: glog log rotate not working correctly

2017-09-21 Thread Tad Vizbaras
There is also library called lumberjack. It integrates nicely with standard 
library.

quote: `Lumberjack is a Go package for writing logs to rolling files.`

https://github.com/natefinch/lumberjack


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: glog log rotate not working correctly

2017-09-20 Thread alexguo123
glog library does not delete log files. It only creates new log files.

Btw, not sure if you actually modified that "line", but note that you only 
need to modify the variable.

Here's a rough example

import (
  "github.com/golang/glog"
)

func main() {
  glog.MaxFileSize = 250MB
}

On Wednesday, September 28, 2016 at 9:51:10 PM UTC-7, Ramkumar Gowrishankar 
wrote:
>
> Hi,
>
> I am using the glog to log for my golang program and I have changed the 
> package to limit maximum file size to 250MB by changing this line (
> https://github.com/golang/glog/blob/master/glog_file.go#L34).
>
> The log rotate seems to be working as intended and the file size gets 
> limited to 250MB but somehow there seems to be a bug in file close/open and 
> the log directory keeps filling up until it runs out of space. df -h 
> command shows that the used space is close to 100% but if I look using du 
> -h or ls and add up the file sizes it is not close to 100%. My platform is 
> CentOS7.
>
> Thanks,
>
> Ramkumar
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: glog log rotate not working correctly

2016-09-29 Thread Dave Cheney
Did you find the open deleted file in /proc/.../fds ?

On Thursday, 29 September 2016 22:37:47 UTC+10, ramkumar.g...@gmail.com 
wrote:
>
> So it looks like a bug in the glog library. Anyway to file a bug against 
> it?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.