4d91b2a7c37f77141c9c905ae815d6dca6aab2be
[collab-maint/awstats.git] / debian / patches / 1003_redirect_to_STDERR.patch
1 Description: Redirect errors of offline scripts to STDERR.
2 Author: Charles Fry <debian@frogcircus.org>
3 Bug-Debian: http://bugs.debian.org/296435
4 Forwarded: https://sourceforge.net/p/awstats/bugs/920
5
6 ---
7  tools/awstats_buildstaticpages.pl |    4 ++--
8  tools/awstats_configure.pl        |    2 +-
9  tools/awstats_exportlib.pl        |    4 ++--
10  tools/awstats_updateall.pl        |    2 +-
11  tools/logresolvemerge.pl          |    4 ++--
12  tools/maillogconvert.pl           |    2 +-
13  6 files changed, 9 insertions(+), 9 deletions(-)
14
15 --- a/tools/awstats_buildstaticpages.pl
16 +++ b/tools/awstats_buildstaticpages.pl
17 @@ -79,7 +79,7 @@
18  # Return:              None
19  #------------------------------------------------------------------------------
20  sub error {
21 -       print "Error: $_[0].\n";
22 +       print STDERR "Error: $_[0].\n";
23      exit 1;
24  }
25  
26 @@ -99,7 +99,7 @@
27  #              print "$messagestring<br />\n";
28  #      }
29  #      else {
30 -               print "$messagestring\n";
31 +               print STDERR "$messagestring\n";
32  #      }
33  #      }
34  }
35 --- a/tools/awstats_configure.pl
36 +++ b/tools/awstats_configure.pl
37 @@ -87,7 +87,7 @@
38  # error
39  #-------------------------------------------------------
40  sub error {
41 -       print "Error: $_[0].\n";
42 +       print STDERR "Error: $_[0].\n";
43      exit 1;
44  }
45  
46 --- a/tools/awstats_exportlib.pl
47 +++ b/tools/awstats_exportlib.pl
48 @@ -92,8 +92,8 @@
49         my $thirdmessage=shift||"";
50         my $donotshowsetupinfo=shift||0;
51         if ($Debug) { debug("$message $secondmessage $thirdmessage",1); }
52 -       print "$message";
53 -       print "\n";
54 +       print STDERR "$message";
55 +       print STDERR "\n";
56         exit 1;
57  }
58  
59 --- a/tools/awstats_updateall.pl
60 +++ b/tools/awstats_updateall.pl
61 @@ -36,7 +36,7 @@
62  # Return:              None
63  #------------------------------------------------------------------------------
64  sub error {
65 -       print "Error: $_[0].\n";
66 +       print STDERR "Error: $_[0].\n";
67      exit 1;
68  }
69  
70 --- a/tools/logresolvemerge.pl
71 +++ b/tools/logresolvemerge.pl
72 @@ -130,7 +130,7 @@
73  # Return:              None
74  #------------------------------------------------------------------------------
75  sub error {
76 -       print "Error: $_[0].\n";
77 +       print STDERR "Error: $_[0].\n";
78      exit 1;
79  }
80  
81 @@ -159,7 +159,7 @@
82  sub warning {
83         my $messagestring=shift;
84         if ($Debug) { debug("$messagestring",1); }
85 -       print "$messagestring\n";
86 +       print STDERR "$messagestring\n";
87  }
88  
89  #-----------------------------------------------------------------------------
90 --- a/tools/maillogconvert.pl
91 +++ b/tools/maillogconvert.pl
92 @@ -56,7 +56,7 @@
93  #-------------------------------------------------------
94  
95  sub error {
96 -       print "Error: $_[0].\n";
97 +       print STDERR "Error: $_[0].\n";
98      exit 1;
99  }
100