패키지 꼬인것 고침
This commit is contained in:
parent
2ca5d87b66
commit
b1f49e40e7
|
@ -1,4 +1,4 @@
|
|||
package util
|
||||
package handler
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package util
|
||||
package image
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
|
|
@ -3,7 +3,7 @@ package logger
|
|||
import "io"
|
||||
|
||||
type WriteSyncer interface {
|
||||
io.Writer
|
||||
io.WriteCloser
|
||||
Sync() error
|
||||
}
|
||||
|
||||
|
|
|
@ -7,14 +7,14 @@ import (
|
|||
"amuz.es/src/infra/goutils/logger"
|
||||
)
|
||||
|
||||
var loggers logger.RotateSyncerSet
|
||||
var loggers RotateSyncerSet
|
||||
|
||||
func NewLogWriter(FileName string, MaxSizeMb, MaxBackup, MaxDay int, logDir string) logger.RotateSyncer {
|
||||
switch FileName {
|
||||
case "Stdout":
|
||||
return newLocked(os.Stdout)
|
||||
return NewLocked(os.Stdout)
|
||||
case "Stderr":
|
||||
return newLocked(os.Stderr)
|
||||
return NewLocked(os.Stderr)
|
||||
default:
|
||||
logpath := FileName
|
||||
if logDir != "" {
|
||||
|
@ -23,7 +23,7 @@ func NewLogWriter(FileName string, MaxSizeMb, MaxBackup, MaxDay int, logDir stri
|
|||
|
||||
log.Println(" Attention!! log writes to ", logpath)
|
||||
|
||||
logWriter := newRotater(
|
||||
logWriter := NewRotater(
|
||||
logpath,
|
||||
MaxSizeMb, // megabytes
|
||||
MaxBackup,
|
||||
|
|
|
@ -3,6 +3,7 @@ package rotater
|
|||
import (
|
||||
"sync"
|
||||
"amuz.es/src/infra/goutils/logger"
|
||||
lumberjack "gopkg.in/natefinch/lumberjack.v2"
|
||||
)
|
||||
|
||||
type rotateSyncer struct {
|
||||
|
|
Reference in New Issue