diff options
| author | Emil Williams | 2025-08-20 22:36:21 +0000 |
|---|---|---|
| committer | Emil Williams | 2025-08-20 22:36:21 +0000 |
| commit | c1390f168d64ac98b3243b1cafa8674be95fb903 (patch) | |
| tree | b5f03c599fbc54634839ca9d48e3d688c555554d | |
| parent | c77da682d171f87203bd139817e37242184d8441 (diff) | |
| download | gorillanest-c1390f168d64ac98b3243b1cafa8674be95fb903.tar.xz gorillanest-c1390f168d64ac98b3243b1cafa8674be95fb903.tar.zst | |
Logging
| -rw-r--r-- | config.pl.example | 1 | ||||
| -rwxr-xr-x | gorillanest.pl | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/config.pl.example b/config.pl.example index fd39608..c6becdf 100644 --- a/config.pl.example +++ b/config.pl.example @@ -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 diff --git a/gorillanest.pl b/gorillanest.pl index 53d3a9d..49a6e4e 100755 --- a/gorillanest.pl +++ b/gorillanest.pl @@ -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; |
