mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 11:59:40 +01:00
Don't override package name
This commit is contained in:
parent
bfcada11dc
commit
2cbbec567c
18
oragono.go
18
oragono.go
@ -47,7 +47,7 @@ Options:
|
|||||||
log.Fatal("Config file did not load successfully:", err.Error())
|
log.Fatal("Config file did not load successfully:", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
logger, err := logger.NewManager(config.Logging)
|
logman, err := logger.NewManager(config.Logging)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Logger did not load successfully:", err.Error())
|
log.Fatal("Logger did not load successfully:", err.Error())
|
||||||
}
|
}
|
||||||
@ -97,13 +97,13 @@ Options:
|
|||||||
} else if arguments["run"].(bool) {
|
} else if arguments["run"].(bool) {
|
||||||
rand.Seed(time.Now().UTC().UnixNano())
|
rand.Seed(time.Now().UTC().UnixNano())
|
||||||
if !arguments["--quiet"].(bool) {
|
if !arguments["--quiet"].(bool) {
|
||||||
logger.Info("startup", fmt.Sprintf("Oragono v%s starting", irc.SemVer))
|
logman.Info("startup", fmt.Sprintf("Oragono v%s starting", irc.SemVer))
|
||||||
}
|
}
|
||||||
|
|
||||||
// profiling
|
// profiling
|
||||||
if config.Debug.StackImpact.Enabled {
|
if config.Debug.StackImpact.Enabled {
|
||||||
if config.Debug.StackImpact.AgentKey == "" || config.Debug.StackImpact.AppName == "" {
|
if config.Debug.StackImpact.AgentKey == "" || config.Debug.StackImpact.AppName == "" {
|
||||||
logger.Error("startup", "Could not start StackImpact - agent-key or app-name are undefined")
|
logman.Error("startup", "Could not start StackImpact - agent-key or app-name are undefined")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,22 +111,22 @@ Options:
|
|||||||
agent.Start(stackimpact.Options{AgentKey: config.Debug.StackImpact.AgentKey, AppName: config.Debug.StackImpact.AppName})
|
agent.Start(stackimpact.Options{AgentKey: config.Debug.StackImpact.AgentKey, AppName: config.Debug.StackImpact.AppName})
|
||||||
defer agent.RecordPanic()
|
defer agent.RecordPanic()
|
||||||
|
|
||||||
logger.Info("startup", fmt.Sprintf("StackImpact profiling started as %s", config.Debug.StackImpact.AppName))
|
logman.Info("startup", fmt.Sprintf("StackImpact profiling started as %s", config.Debug.StackImpact.AppName))
|
||||||
}
|
}
|
||||||
|
|
||||||
// warning if running a non-final version
|
// warning if running a non-final version
|
||||||
if strings.Contains(irc.SemVer, "unreleased") {
|
if strings.Contains(irc.SemVer, "unreleased") {
|
||||||
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.")
|
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.")
|
||||||
}
|
}
|
||||||
|
|
||||||
server, err := irc.NewServer(config, logger)
|
server, err := irc.NewServer(config, logman)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("startup", fmt.Sprintf("Could not load server: %s", err.Error()))
|
logman.Error("startup", fmt.Sprintf("Could not load server: %s", err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !arguments["--quiet"].(bool) {
|
if !arguments["--quiet"].(bool) {
|
||||||
logger.Info("startup", "Server running")
|
logman.Info("startup", "Server running")
|
||||||
defer logger.Info("shutdown", fmt.Sprintf("Oragono v%s exiting", irc.SemVer))
|
defer logman.Info("shutdown", fmt.Sprintf("Oragono v%s exiting", irc.SemVer))
|
||||||
}
|
}
|
||||||
server.Run()
|
server.Run()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user