]> git.xolatile.top Git - gorillanest.git/commitdiff
Logging
authorEmil Williams <emilemilemil@cock.li>
Wed, 20 Aug 2025 22:36:21 +0000 (22:36 +0000)
committerEmil Williams <emilemilemil@cock.li>
Wed, 20 Aug 2025 22:36:21 +0000 (22:36 +0000)
config.pl.example
gorillanest.pl

index fd39608c7b39598630343963633e953c8f246365..c6becdff999f3038d038c5ecf55af116cec5ed2c 100644 (file)
@@ -1,4 +1,5 @@
 # always assume anything to do with files is from project root
+use constant LOG_FILE => '/tmp/gorillanest.log';
 use constant GIT_ROOT => 'git'; # directory containing all browsable $users/$repositories
 use constant DB_FILE => 'gorillanest.sqlite3'; # sqlite3 database file location
 use constant TEMPLATE_ROOT => 'template'; # template directory
index 53d3a9dedcc27b74fd79dd9670c49eb674496356..49a6e4ef2c22964085558412aa779112b11361b7 100755 (executable)
@@ -22,7 +22,7 @@ sub info {
 # significant dirs only
 sub GN::directories {
     my $root = $_[0];
-    opendir my $dir, $root or die "Cannot open directory: $!";
+    opendir my $dir, $root or die "$root: $!";
     my @directories;
     my %drop = (
         '.'  => 0,
@@ -62,7 +62,7 @@ sub GN::repository { # /$username/$repository
 }
 
 sub GN::main {
-    open STDERR, '>', '/tmp/gorillanest.log' or die "You Will Never Ever See This Message Hopefully: $!";
+    open STDERR, '>', LOG_FILE or die LOG_FILE . ": $!";
     my $sock = FCGI::OpenSocket('/tmp/gorillanest.socket', 100);
     try {
         my $root = GIT_ROOT;