From f814675bd1650039e06577ef7687b2861f76e16a Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Sat, 18 Jul 2020 14:04:40 -0400 Subject: [PATCH] env: Move MOJO_LOG_LEVEL to gloat.pl (instead of start script) Since we always want this to be 'debug', it makes sense to set it in gloat.pl instead of the restart.sh script. This is important as I work on a rc.d init script for OpenBSD (where, AFAICT, there is no environment passed to the daemon). --- bin/restart.sh | 2 -- gloat.pl | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/restart.sh b/bin/restart.sh index abf86cc..30d8d60 100755 --- a/bin/restart.sh +++ b/bin/restart.sh @@ -35,8 +35,6 @@ restart() { else export MOJO_MODE=production fi - # Always log in debug, regardless of prod vs preprod - export MOJO_LOG_LEVEL=debug printf "%s" "Starting new server... " $HOME/${name}-el/gloat.pl daemon -l http://*:$port >> /var/log/gloat/$name.log 2>&1 & diff --git a/gloat.pl b/gloat.pl index 2d49885..ada9875 100755 --- a/gloat.pl +++ b/gloat.pl @@ -11,6 +11,9 @@ use lib "$FindBin::RealBin/lib"; use Euchre::Host; +# Always log in debug, regardless of prod vs preprod +$ENV{MOJO_LOG_LEVEL} = 'debug'; + plugin Webpack => {process => [qw(js css sass)]}; get '/' => sub { -- libgit2 1.1.1