diff --git a/unix/KasmVNC/Logger.pm b/unix/KasmVNC/Logger.pm index b8e64af..e5ab497 100644 --- a/unix/KasmVNC/Logger.pm +++ b/unix/KasmVNC/Logger.pm @@ -8,9 +8,18 @@ use Data::Dumper; sub new { my ($class, $args) = @_; my $self = bless { + level => $args->{level} // "warn" }, $class; } +sub debug { + my $self = shift; + + return unless ($self->{level} eq "debug"); + + say { *STDERR } @_; +} + sub warn { my $self = shift;