From 34c35912a4b457c4240c31b956f93c4d87726427 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 1 Sep 2024 10:49:20 +0200 Subject: streamline logging --- lib/Object/Groupware/Calendar.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/Object/Groupware/Calendar.pm') diff --git a/lib/Object/Groupware/Calendar.pm b/lib/Object/Groupware/Calendar.pm index 3d46032..d51e833 100644 --- a/lib/Object/Groupware/Calendar.pm +++ b/lib/Object/Groupware/Calendar.pm @@ -9,6 +9,7 @@ use utf8; use Log::Any qw( ); use Data::ICal::DateTime; +use Encode qw(decode_utf8); use Object::Groupware::Event; @@ -25,10 +26,10 @@ ADJUST { } elsif ($filename) { $data = Data::ICal->new( filename => $filename ) } - if ( $log->is_trace ) { - use DDP; - p $data; - } + $log->tracef( + "Object %s contents:\n%s", __CLASS__, + decode_utf8 $data->as_string + ); } # mimick Data::ICal::DateTime::events() signature -- cgit v1.2.3