diff options
Diffstat (limited to 'example/ivyprobe.pl')
-rwxr-xr-x | example/ivyprobe.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/example/ivyprobe.pl b/example/ivyprobe.pl index 41efe78..ba095df 100755 --- a/example/ivyprobe.pl +++ b/example/ivyprobe.pl @@ -34,6 +34,8 @@ my $timestamp = 0; my $noReadLineMode ; my $regexpFile; my $classes; +my $messCount=0; + my @classes = (); # for each application gives the number of running instances @@ -125,6 +127,12 @@ $Ivyobj->fileEvent(*STDIN, \&cb); $Ivyobj->mainLoop(); +sub printtime_mess { + return if (!$timestamp); + my ($sec,$min,$hour) = localtime(); + printf "[%02d:%02d:%02d>>%d] ", $hour, $min, $sec, $messCount++; +} + sub printtime { return if (!$timestamp); my ($sec,$min,$hour) = localtime(); @@ -277,6 +285,7 @@ sub callback { my $paramString = ""; if (scalar @param) { $paramString = join ("' '", @param); } + printtime_mess(); print "$appname sent '", $paramString, "'\n"; } |