fix breaks

This commit is contained in:
Asim Aslam
2019-12-17 15:46:09 +00:00
parent bc30efcf70
commit d502e2f58a
4 changed files with 24 additions and 20 deletions

View File

@@ -174,6 +174,6 @@ func SetPrefix(p string) {
}
// Set service name
func Name(name string) {
func SetName(name string) {
prefix = fmt.Sprintf("[%s]", name)
}

View File

@@ -7,10 +7,19 @@ type Option func(*Options)
// Options are logger options
type Options struct {
// Name of the log
Name string
// Size is the size of ring buffer
Size int
}
// Name of the log
func Name(n string) Option {
return func(o *Options) {
o.Name = n
}
}
// Size sets the size of the ring buffer
func Size(s int) Option {
return func(o *Options) {