Changeset 1184


Ignore:
Timestamp:
Jun 12, 2015, 3:41:38 PM (10 years ago)
Author:
joergs
Message:

added timestamp in logfile, generate project_path parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • obs_notify_generic/obs_notify_generic.pm

    r1179 r1184  
    3434use Data::Dumper;
    3535use IPC::Run;
     36use Time::Piece;
    3637
    3738#use XML::Simple;
     
    8081
    8182                #print $entry->{'action'}, "\n";
     83                if ( $paramRef->{'project'} ) {
     84                                        my $project = $paramRef->{'project'};
     85                                        $project =~ s/:/:\//g;
     86                                        $paramRef->{'project_path'}="/srv/obs/repos/" . $project;
     87                }
    8288                my $check = join '|', keys %{$paramRef};
    8389                my $action = $entry->{'action'};
     
    150156    }
    151157
     158    print $fh localtime->strftime("%Y%m%d %H%M%S"), " TYPE=$type";
     159   
    152160    if ($extra) {
    153         print $fh "TYPE=$type\n";
     161        print $fh "\n";
    154162        print $fh Dumper( { 'param' => $paramRef, 'extra' => $extra } );
    155163        print $fh "\n";
    156164    } else {
    157         print $fh "TYPE=$type ";
     165        print $fh " ";
    158166        print $fh Data::Dumper->new( [$paramRef] )->Indent(0)->Dump;
    159167        print $fh "\n";
Note: See TracChangeset for help on using the changeset viewer.