|
@@ -47,7 +47,7 @@ Options:
|
47
|
47
|
log.Fatal("Config file did not load successfully:", err.Error())
|
48
|
48
|
}
|
49
|
49
|
|
50
|
|
- logger, err := logger.NewManager(config.Logging)
|
|
50
|
+ logman, err := logger.NewManager(config.Logging)
|
51
|
51
|
if err != nil {
|
52
|
52
|
log.Fatal("Logger did not load successfully:", err.Error())
|
53
|
53
|
}
|
|
@@ -97,13 +97,13 @@ Options:
|
97
|
97
|
} else if arguments["run"].(bool) {
|
98
|
98
|
rand.Seed(time.Now().UTC().UnixNano())
|
99
|
99
|
if !arguments["--quiet"].(bool) {
|
100
|
|
- logger.Info("startup", fmt.Sprintf("Oragono v%s starting", irc.SemVer))
|
|
100
|
+ logman.Info("startup", fmt.Sprintf("Oragono v%s starting", irc.SemVer))
|
101
|
101
|
}
|
102
|
102
|
|
103
|
103
|
// profiling
|
104
|
104
|
if config.Debug.StackImpact.Enabled {
|
105
|
105
|
if config.Debug.StackImpact.AgentKey == "" || config.Debug.StackImpact.AppName == "" {
|
106
|
|
- logger.Error("startup", "Could not start StackImpact - agent-key or app-name are undefined")
|
|
106
|
+ logman.Error("startup", "Could not start StackImpact - agent-key or app-name are undefined")
|
107
|
107
|
return
|
108
|
108
|
}
|
109
|
109
|
|
|
@@ -111,22 +111,22 @@ Options:
|
111
|
111
|
agent.Start(stackimpact.Options{AgentKey: config.Debug.StackImpact.AgentKey, AppName: config.Debug.StackImpact.AppName})
|
112
|
112
|
defer agent.RecordPanic()
|
113
|
113
|
|
114
|
|
- logger.Info("startup", fmt.Sprintf("StackImpact profiling started as %s", config.Debug.StackImpact.AppName))
|
|
114
|
+ logman.Info("startup", fmt.Sprintf("StackImpact profiling started as %s", config.Debug.StackImpact.AppName))
|
115
|
115
|
}
|
116
|
116
|
|
117
|
117
|
// warning if running a non-final version
|
118
|
118
|
if strings.Contains(irc.SemVer, "unreleased") {
|
119
|
|
- logger.Warning("startup", "You are currently running an unreleased beta version of Oragono that may be unstable and could corrupt your database.\nIf you are running a production network, please download the latest build from https://oragono.io/downloads.html and run that instead.")
|
|
119
|
+ logman.Warning("startup", "You are currently running an unreleased beta version of Oragono that may be unstable and could corrupt your database.\nIf you are running a production network, please download the latest build from https://oragono.io/downloads.html and run that instead.")
|
120
|
120
|
}
|
121
|
121
|
|
122
|
|
- server, err := irc.NewServer(config, logger)
|
|
122
|
+ server, err := irc.NewServer(config, logman)
|
123
|
123
|
if err != nil {
|
124
|
|
- logger.Error("startup", fmt.Sprintf("Could not load server: %s", err.Error()))
|
|
124
|
+ logman.Error("startup", fmt.Sprintf("Could not load server: %s", err.Error()))
|
125
|
125
|
return
|
126
|
126
|
}
|
127
|
127
|
if !arguments["--quiet"].(bool) {
|
128
|
|
- logger.Info("startup", "Server running")
|
129
|
|
- defer logger.Info("shutdown", fmt.Sprintf("Oragono v%s exiting", irc.SemVer))
|
|
128
|
+ logman.Info("startup", "Server running")
|
|
129
|
+ defer logman.Info("shutdown", fmt.Sprintf("Oragono v%s exiting", irc.SemVer))
|
130
|
130
|
}
|
131
|
131
|
server.Run()
|
132
|
132
|
}
|