From 7ee6c48fb0a3f82ccd2bc05aecffc826bff7288b Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 30 Jan 2022 19:51:23 -0500 Subject: [PATCH] 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. --- environment/docker/container.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/environment/docker/container.go b/environment/docker/container.go index 525f9a1..04dca30 100644 --- a/environment/docker/container.go +++ b/environment/docker/container.go @@ -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", }, },