go-logging icon indicating copy to clipboard operation
go-logging copied to clipboard

Making message queue size configurable

Open debraj-manna opened this issue 10 years ago • 2 comments
trafficstars

It seems if requestSize and queueSize gets full then the go-routine who is invoking go-logging for logging will get blocked.

It will be good if:-

  1. go-logging allows the requestSize, queueSize and flush interval to be configurable
  2. and also if it shows a message telling buffer size is full ( somewhere here ) then each application can tune the requestSize, queueSize and flush interval as per their need.

Let me what you feel.

debraj-manna avatar Jul 18 '15 14:07 debraj-manna

That's a great idea! Please send a pl to me if you have time. Otherwise I will write one when I am free (not sure when it will happen).

ccding avatar Jul 20 '15 17:07 ccding

I added configurations for (1).

see this function

func CustomizedLogger(name string, level Level, format string, timeFormat string, out io. Writer, sync bool, queueSize int, requestSize int, bufferSize int, timeInterval time.Duration) (*Logger, error)

Hope that helps

ccding avatar Jul 31 '16 02:07 ccding