diff --git a/ulog_parser.pl b/ulog_parser.pl index e4c04941..bae015d8 100755 --- a/ulog_parser.pl +++ b/ulog_parser.pl @@ -3,11 +3,13 @@ use 5.014; use strict; use warnings; use JSON; -use YAML; +use YAML::Syck; use File::Spec; use Cwd 'abs_path'; use Data::Dumper; +local $YAML::Syck::SingleQuote = 1 ; + my $filename = "/var/log/ngcp/kamailio-proxy.log"; my $output_dir = "log"; my $path; @@ -31,7 +33,7 @@ sub save_data { if (!$data->{'sip_out'}) { print "no sip_out\n"; } $path = File::Spec->catfile( $output_dir, (sprintf "%04i", $data->{'msgid'}).".yml"); - YAML::DumpFile($path, $data); + YAML::Syck::DumpFile($path, $data); #print "$data->{'msgid'} saved\n"; } $data = {