Changelog 0.3.0
This commit is contained in:
14
common/logger.go
Normal file
14
common/logger.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
func NewLogger(prefix string, output *os.File) *log.Logger {
|
||||
f := fmt.Sprintf("[%s] ", prefix)
|
||||
return log.New(output, f, log.LstdFlags)
|
||||
}
|
||||
|
||||
var Logger = NewLogger("Main", os.Stdout)
|
||||
Reference in New Issue
Block a user