Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

Commit e76ae7b

Browse files
author
Alexander Wirt
committed
Add general debug env flag for DB connection info
1 parent 7cb4b9e commit e76ae7b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Paste.pm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ sub new {
7171
$dsn .= ";host=$dbhost" if $dbhost;
7272
$dsn .= ";port=$dbport" if $dbport;
7373

74+
if ( $ENV{PASTE_DEBUG} ) {
75+
my $masked = $dbpass ? '***' : '';
76+
warn "DB debug: dsn=$dsn user=$dbuser pass=$masked\n";
77+
}
78+
7479
my $base_url = $ENV{BASE_URL}
7580
|| $config->val( 'www', 'base_url' )
7681
|| carp "base_url not specified in config";

0 commit comments

Comments
 (0)