Ignore:
Timestamp:
Jan 7, 2014, 6:00:45 PM (9 years ago)
Author:
Jason Gross <jgross@mit.edu>
Children:
e7ab1d7
Parents:
db1a2f8b
git-author:
Jason Gross <jgross@mit.edu> (07/12/11 12:34:46)
git-committer:
Jason Gross <jgross@mit.edu> (01/07/14 18:00:45)
Message:
Moved log generation code to perl.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Message/Zephyr.pm

    r0adbce1 rc877a63  
    223223}
    224224
     225# Logging
     226sub log_header {
     227    my ($m) = @_;
     228    my $class = $m->class;
     229    my $instance = $m->instance;
     230    my $opcode = $m->opcode;
     231    my $timestr = $m->time;
     232    my $host = $m->host;
     233    my $sender = $m->pretty_sender;
     234    my $zsig = $m->zsig;
     235    my $rtn = "Class: $class Instance: $instance";
     236    $rtn .= " Opcode: $opcode" unless !defined $opcode || $opcode eq '';
     237    $rtn .= "\nTime: $timestr Host: $host"
     238          . "\nFrom: $zsig <$sender>";
     239    return $rtn;
     240}
    225241
    2262421;
Note: See TracChangeset for help on using the changeset viewer.