Skip to content

Commit

Permalink
Merge pull request #5 from vinely/master
Browse files Browse the repository at this point in the history
fix init log for windows issue
  • Loading branch information
Honglei-Cong authored Sep 18, 2018
2 parents e054108 + 5907365 commit a2eee80
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ limitations under the License.
package log

import (
"fmt"
"io"
"os"
"path/filepath"
"sync/atomic"
"time"
"os"
"io"
"fmt"
)

type Level int32
Expand Down Expand Up @@ -108,9 +109,12 @@ func (l *Logger) Error(msg string, fields ...Field) {
}
}


func InitLog(path string) {
logFile, err := fileOpen(path + "ActorLog/")
logFile, err := fileOpen(filepath.Join(path, "ActorLog/"))
if err != nil {
fmt.Println("InitLog: open log file failed, err is %s" + err.Error())
os.Exit(1)
}
writers := []io.Writer{logFile, os.Stderr}
fileAndStdoutWrite := io.MultiWriter(writers...)
if err != nil {
Expand Down

0 comments on commit a2eee80

Please sign in to comment.