mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-25 09:33:50 +01:00
vncserver: support Logger debug level
This commit is contained in:
parent
a1cd656910
commit
a1b138e5e1
@ -8,9 +8,18 @@ use Data::Dumper;
|
|||||||
sub new {
|
sub new {
|
||||||
my ($class, $args) = @_;
|
my ($class, $args) = @_;
|
||||||
my $self = bless {
|
my $self = bless {
|
||||||
|
level => $args->{level} // "warn"
|
||||||
}, $class;
|
}, $class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub debug {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
return unless ($self->{level} eq "debug");
|
||||||
|
|
||||||
|
say { *STDERR } @_;
|
||||||
|
}
|
||||||
|
|
||||||
sub warn {
|
sub warn {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user