configurable socket log count; closes pterodactyl/panel#2659

This commit is contained in:
Dane Everitt 2020-11-06 20:56:21 -08:00
parent af9ed4bff1
commit a74be8f4eb
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
2 changed files with 6 additions and 3 deletions

View File

@ -70,6 +70,9 @@ type SystemConfiguration struct {
// when it boots and one is not detected.
EnableLogRotate bool `default:"true" yaml:"enable_log_rotate"`
// The number of lines to send when a server connects to the websocket.
WebsocketLogCount int `default:"150" yaml:"websocket_log_count"`
Sftp SftpConfiguration `yaml:"sftp"`
}

View File

@ -368,7 +368,7 @@ func (h *Handler) HandleInbound(m Message) error {
return nil
}
logs, err := h.server.Environment.Readlog(100)
logs, err := h.server.Environment.Readlog(config.Get().System.WebsocketLogCount)
if err != nil {
return err
}