Use a more efficient logging format for containers

JSON has a huge amount of overhead from Docker when we're trying to process large amounts of log data. It makes more sense to just use a better format.
This commit is contained in:
Dane Everitt 2022-01-30 19:51:23 -05:00
parent 2b2b5200eb
commit 7ee6c48fb0

View File

@ -16,7 +16,7 @@ import (
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/mount"
"github.com/docker/docker/client"
"github.com/docker/docker/daemon/logger/jsonfilelog"
"github.com/docker/docker/daemon/logger/local"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment"
@ -216,11 +216,12 @@ func (e *Environment) Create() error {
// since we only need it for the last few hundred lines of output and don't care
// about anything else in it.
LogConfig: container.LogConfig{
Type: jsonfilelog.Name,
Type: local.Name,
Config: map[string]string{
"max-size": "5m",
"max-file": "1",
"compress": "false",
"mode": "non-blocking",
},
},