mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-25 09:33:50 +01:00
vncserver: add debug output on config load
This commit is contained in:
parent
a1b138e5e1
commit
797c57121a
@ -8,6 +8,8 @@ use Data::Dumper;
|
||||
use Hash::Merge::Simple;
|
||||
use KasmVNC::Utils;
|
||||
|
||||
our $logger;
|
||||
|
||||
sub merge {
|
||||
my @configsToMerge = map { $_->{data} } @_;
|
||||
my $mergedConfig = Hash::Merge::Simple::merge(@configsToMerge) // {};
|
||||
@ -31,6 +33,7 @@ sub load {
|
||||
|
||||
failIfConfigNotReadable($self->{filename});
|
||||
|
||||
$logger->debug("Loading config " . $self->{filename});
|
||||
$self->{data} = YAML::Tiny->read($self->{filename})->[0];
|
||||
}
|
||||
|
||||
|
@ -1171,6 +1171,7 @@ sub DefineFilePathsAndStuff {
|
||||
|
||||
$KasmVNC::Users::vncPasswdBin = $exedir . "kasmvncpasswd";
|
||||
$KasmVNC::Users::logger = $logger;
|
||||
$KasmVNC::Config::logger = $logger;
|
||||
|
||||
$vncSystemConfigDir = "/etc/kasmvnc";
|
||||
if ($ENV{KASMVNC_DEVELOPMENT}) {
|
||||
@ -1979,7 +1980,7 @@ sub DefineConfigToCLIConversion {
|
||||
$self = shift;
|
||||
|
||||
my @values = @{ listify($self->configValues()) };
|
||||
|
||||
|
||||
my $valuesStr = "";
|
||||
foreach $value (@values) {
|
||||
$valuesStr = $valuesStr . "-http-header '$value' "
|
||||
@ -2754,5 +2755,6 @@ sub SetAppSettingsFromConfigAndCli {
|
||||
}
|
||||
|
||||
sub InitLogger {
|
||||
$logger = KasmVNC::Logger->new();
|
||||
my $debugEnabled = any { $_ eq "-debug" } @ARGV;
|
||||
$logger = KasmVNC::Logger->new({ level => $debugEnabled ? "debug" : "warn" });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user