/[smeserver]/rpms/e-smith-viewlogfiles/sme7/e-smith-viewlogfiles-1.8.0.squid_timestamps.patch
ViewVC logotype

Annotation of /rpms/e-smith-viewlogfiles/sme7/e-smith-viewlogfiles-1.8.0.squid_timestamps.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Tue Oct 7 19:25:24 2008 UTC (15 years, 8 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
New streams

1 slords 1.1 diff -Nur -x '*.orig' -x '*.rej' e-smith-viewlogfiles-1.8.0/root/etc/e-smith/web/functions/viewlogfiles mezzanine_patched_e-smith-viewlogfiles-1.8.0/root/etc/e-smith/web/functions/viewlogfiles
2     --- e-smith-viewlogfiles-1.8.0/root/etc/e-smith/web/functions/viewlogfiles 2006-03-15 14:31:03.000000000 -0500
3     +++ mezzanine_patched_e-smith-viewlogfiles-1.8.0/root/etc/e-smith/web/functions/viewlogfiles 2007-09-29 11:18:54.000000000 -0400
4     @@ -7,7 +7,7 @@
5     #
6     # $Id: viewlogfiles,v 1.31 2005/08/25 21:08:41 charlieb Exp $
7     #----------------------------------------------------------------------
8     -# copyright (C) 1999-2005 Mitel Networks Corporation
9     +# copyright (C) 1999-2007 Mitel Networks Corporation
10     #
11     # This program is free software; you can redistribute it and/or modify
12     # it under the terms of the GNU General Public License as published by
13     @@ -120,11 +120,18 @@
14    
15     our %logfiles = ();
16    
17     -sub tai64nlocal
18     +sub timestamp2local
19     {
20     - my $line = shift;
21     - return $line unless ($line =~ /^(\@[0-9a-f]{24})(.*)/s);
22     - return Time::TAI64::tai64nlocal($1) . $2;
23     + $_ = shift;
24     + if (/^(\@[0-9a-f]{24})(.*)/s)
25     + {
26     + return Time::TAI64::tai64nlocal($1) . $2;
27     + }
28     + elsif (/^([0-9]{10}\.[0-9]{3})(.*)/s)
29     + {
30     + return localtime($1) . $2;
31     + }
32     + return $_;
33     }
34    
35     sub findlogFiles
36     @@ -160,7 +167,7 @@
37    
38     if ( $file_base =~ /@.*/ )
39     {
40     - $logfiles{$path} = $file_path . tai64nlocal($file_base);
41     + $logfiles{$path} = $file_path . timestamp2local($file_base);
42     }
43     else
44     {
45     @@ -274,7 +281,7 @@
46     next unless /$matchPattern/;
47     $somethingMatched = 1;
48    
49     - $_ = tai64nlocal($_);
50     + $_ = timestamp2local($_);
51     $_ = HTML::Entities::encode_entities($_);
52     ($highlightPattern && /$highlightPattern/)
53     ? print "<b>$_</b>"
54     @@ -398,7 +405,7 @@
55     while (my $line = <FILE>)
56     {
57     chomp $line;
58     - print tai64nlocal($line) . $nl;
59     + print timestamp2local($line) . $nl;
60     }
61     close(FILE);
62    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed