forked from FactomProject/FactomCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog.go
More file actions
26 lines (21 loc) · 643 Bytes
/
log.go
File metadata and controls
26 lines (21 loc) · 643 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2015 Factom Foundation
// Use of this source code is governed by the MIT
// license that can be found in the LICENSE file.
package wsapi
import (
"os"
"github.com/FactomProject/FactomCode/factomlog"
"github.com/FactomProject/FactomCode/util"
)
var (
logcfg = util.ReadConfig().Log
logPath = logcfg.LogPath
logLevel = logcfg.LogLevel
logfile, _ = os.OpenFile(logPath, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0660)
)
// setup subsystem loggers
var (
rpcLog = factomlog.New(logfile, logLevel, "rpc")
serverLog = factomlog.New(logfile, logLevel, "serv")
wsLog = factomlog.New(logfile, logLevel, "wsapi")
)