go-logging
go-logging copied to clipboard
Making message queue size configurable
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:-
- go-logging allows the
requestSize,queueSizeand flush interval to be configurable - and also if it shows a message telling buffer size is full ( somewhere here ) then each application can tune the
requestSize,queueSizeand flush interval as per their need.
Let me what you feel.
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).
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