Skip to content

Commit 15a1983

Browse files
committed
updated method name for cleanup
1 parent e630fdb commit 15a1983

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

examples/concurrent/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
func main() {
1111

1212
logger := glog.UnstructureGlogger("glogger.log")
13-
defer logger.Close()
13+
defer logger.Cleanup()
1414

1515
var wg sync.WaitGroup
1616
for i := 0; i < 1000; i++ {

examples/json-log/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import "github.com/ric-v/glog"
55
func main() {
66

77
logger := glog.JSONGlogger("glogger.json")
8-
defer logger.Close()
8+
defer logger.Cleanup()
99

1010
logger.Info("", "Hello", "World")
1111
logger.Warn("", "Another", "Hello", "World")

glogger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type Glogger interface {
2222
Info(string, ...interface{})
2323
Debug(string, ...interface{})
2424
log(string, LogLevel, ...interface{})
25-
Close()
25+
Cleanup()
2626
}
2727

2828
// Options is a struct for setting the format of the log messages

json_glogger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (g *JSONGlog) log(format string, level LogLevel, msg ...interface{}) {
7575
}
7676

7777
// safely close the custom logger
78-
func (g *JSONGlog) Close() {
78+
func (g *JSONGlog) Cleanup() {
7979
close(g.queue)
8080
g.wg.Wait()
8181
}

unstructure_glogger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (g *UnstructureGlog) log(format string, level LogLevel, msg ...interface{})
4545
}
4646

4747
// safely close the custom logger
48-
func (g *UnstructureGlog) Close() {
48+
func (g *UnstructureGlog) Cleanup() {
4949
close(g.queue)
5050
g.wg.Wait()
5151
}

0 commit comments

Comments
 (0)