infra
/
goutils
Archived
1
0
Fork 0

패키지 꼬인것 고침

This commit is contained in:
Sangbum Kim 2018-06-10 16:57:59 +09:00
parent 2ca5d87b66
commit b1f49e40e7
5 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,4 @@
package util
package handler
import (
"sync"

View File

@ -1,4 +1,4 @@
package util
package image
import (
"sync"

View File

@ -3,7 +3,7 @@ package logger
import "io"
type WriteSyncer interface {
io.Writer
io.WriteCloser
Sync() error
}

View File

@ -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,

View File

@ -3,6 +3,7 @@ package rotater
import (
"sync"
"amuz.es/src/infra/goutils/logger"
lumberjack "gopkg.in/natefinch/lumberjack.v2"
)
type rotateSyncer struct {