From dc559a70cb08f7f181ca04e15d59d3413eff78b0 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Wed, 7 Sep 2022 05:51:57 +0900 Subject: [PATCH] print stderr --- app/controllers/index.ts | 2 +- supervisord.conf | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/index.ts b/app/controllers/index.ts index bd9cec0..568018c 100644 --- a/app/controllers/index.ts +++ b/app/controllers/index.ts @@ -9,7 +9,7 @@ declare module "fastify" { } export function App(config: Config = defaultConfig()): FastifyInstance { - const app = fastify({ logger: true }); + const app = fastify({ logger: { stream: process.stderr, level: "warn" } }); app.decorate("config", config).register(routes); return app; } diff --git a/supervisord.conf b/supervisord.conf index bf9821a..9d043e4 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -4,6 +4,10 @@ user = root [program:app] command = npm --prefix app start +stderr_logfile = /dev/stderr +stderr_logfile_maxbytes = 0 [program:api] command = postgrest +stderr_logfile = /dev/stderr +stderr_logfile_maxbytes = 0