Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: pdf layout

...


Div
classcommandline

#use strict;

########################################################

## Copyright (c) 2008 Kirk Bauer

## Covered under the included MIT/X-Consortium License:

## http://www.opensource.org/licenses/mit-license.php

#<< lines removed >>

#########################################################

use POSIX qw(strftime);

use Logwatch ':dates';

my ($SearchDate, $ThisLine);

my ($incount, $outcount) = (0, 0);

my $time = time;

my $hostname = $ENV{'HOSTNAME'};

my $OSname = $ENV{'OSname'};

$SearchDate = TimeFilter("%y%m%d:%H%M%S");

my $all = 0;

while (defined($ThisLine = <STDIN>)) {

$incount++;

if ($SearchDate =~ m/\.+/) {

$SD = $SearchDate;

$SD =~ s/\(//g;

@SDPARTS = split (':',$SD);

$datepart1 = $SDPARTS[0];

if ($all == 1) {

print $ThisLine;

$outcount++; }

#  if date is the same, print line if time is greater or equal to

# search time

elsif ($ThisLine =~ m/^\d+($datepart1):(\d{0,6})/) {

$linedate = $1.':'.$2;

if ($linedate ge $SD) {

print $ThisLine;

$outcount++; }

}

# else, if date is larger than search date, print all lines from here on

elsif ($ThisLine =~ m/^\d{2}(\d{6}):/) {

if ($1 gt $datepart1) {

print $ThisLine;

$outcount++;

$all = 1; }

}  }   }




Div
classpagebreak
Note

The script above does not cover all parameters possible for the range parameter of logwatch. It is provided only as an example for informational purposes.

...

(warning) Please note that not all messages are shown in the log excerpt above because the configuration parameter log_repeat_filter was set to on (default).

Div
classpagebreak


To receive all messages, this parameter must be set to off in the emulator configuration file. This will create a more detailed output as shown below. In particular, it shows the grace period after which the emulator will stop:


Div
classcommandline

20180612:132038:WARN :1:0000024D:licenseman(1830): Communication with the license key "879642840" lost.

20180612:132438:INFO :0:0000024D:licenseman(1823): Performing regular check of the current license.

20180612:132438:WARN :1:0000024D:licenseman(1830): Unable to log in to the key "879642840", feature 0.

20180612:132438:WARN :1:0000024D:licenseman(1830): HASP runtime (7): Sentinel protection key not available.

20180612:132438:WARN :1:0000024D:licenseman(1830): Failed to login at the Sentinel HASP key: "879642840".

20180612:132438:WARN :1:0000024D:licenseman(1830): Connection to license key:"879642840" id:"1002922" lost.

Application will stop at 13-Jun-2018 01:24:38.

20180612:132438:INFO :0:00000424:ethane.cxx(3514): session: Detected removal of the license.

...


The following Charon-AXP/SMA log file excerpt shows the message written after the dongle has been removed:

...