I am counting the error code for Mechanism4. But it is not giving me the desired output,instead it prints 0. Here is the snippet of the logfile-my $logFile = $ARGV[0]; die "usage: $0 <logFile>" unless $logFile; die "Logfile $logFile doesn't exist" unless -f "$logFile"; open(my $log, "<", $logFile) or die "Can't open $logFile for reading." +; print "Processing file $logFile...\n"; #my $authenticates = {}; my $n = 0; my $ArcotIDError_Count = 0; my $QnAError_Count = 0; my $UPError_Count = 0; my $OTPError_Count = 0; my $errorCode; while(my $line = <$log>) { $n++; $line =~ tr/\r\n//d; if($line =~ /Handling NSPAdvice for mechanism [4]/) { while ( $line = <$log> ) { if ($line =~ /Authentication mechanism returned [[](\S*)[] +]/) { my $errorCode = $1; print $errorCode; if ($errorCode != 0 || $errorCode != 1) { $ArcotIDError_Count++; } } next; } } } print "Total Number Of ArcotID Authentication ErrorCode returned i +s $ArcotIDError_Count\n";
Thanks NTHandle_NSPAdvice:: Handling NSPAdvice for mechanism [4] Fri May 29 18:39:05.217 2009 Morocco Standard Time INFO: pid 3216 t +id 2592: 170: 133090: Handle_NSPAdvice::NSP Action :[NSP_INC] Fri May 29 18:39:05.217 2009 Morocco Standard Time INFO: pid 3216 t +id 2592: 170: 133090: Using Oracle Query Fri May 29 18:39:05.217 2009 Morocco Standard Time INFO: pid 3216 t +id 2592: 170: 133090: NSP Update Query is based on Serial Number Fri May 29 18:39:05.232 2009 Morocco Standard Time INFO: pid 3216 t +id 2592: 17: 133090: ArAuthFrameworkImpl::doPostAuth::11:133088:: Aut +hentication mechanism returned [3] for AuthIdentity [01246825]
In reply to not getting desired output by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |