You've already forked factorio-server-manager
mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2026-06-19 20:06:55 +02:00
Fixed custom chat log option (#313)
Server was started before the `--console-log` option as added to the arguments.
This commit is contained in:
@@ -265,6 +265,11 @@ func (server *Server) Run() error {
|
||||
} else {
|
||||
args = append(args, "--start-server", filepath.Join(config.FactorioSavesDir, server.Savefile))
|
||||
}
|
||||
|
||||
// Write chat log to a different file if requested (if not it will be mixed-in with the default logfile)
|
||||
if config.ChatLogFile != "" {
|
||||
args = append(args, "--console-log", config.ChatLogFile)
|
||||
}
|
||||
|
||||
if config.GlibcCustom == "true" {
|
||||
log.Println("Starting server with command: ", config.GlibcLocation, args)
|
||||
@@ -273,12 +278,7 @@ func (server *Server) Run() error {
|
||||
log.Println("Starting server with command: ", config.FactorioBinary, args)
|
||||
server.Cmd = exec.Command(config.FactorioBinary, args...)
|
||||
}
|
||||
|
||||
// Write chat log to a different file if requested (if not it will be mixed-in with the default logfile)
|
||||
if config.ChatLogFile != "" {
|
||||
args = append(args, "--console-log", config.ChatLogFile)
|
||||
}
|
||||
|
||||
|
||||
server.StdOut, err = server.Cmd.StdoutPipe()
|
||||
if err != nil {
|
||||
log.Printf("Error opening stdout pipe: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user