- Accept unlimited line length when converting or splitting the log file.
- Use long options on the command line.
- Sarg can output the internal css inlined in the reports. It replaces the css.tpl distributed with the sources.
+ - Command line option -l is optional. The input log files may be named on the command line without prefixing them with -l. It allows the use of wildcards in the command line.
Feb-10-2010 Version 2.2.7.1
- Fixed compilation error reported by some compilers due to an sizeof in a fprintf (thanks to Maxim Britov and Renato Botelho).
exit(2);
}
+ if (optind<argc) {
+ for (iarq=optind ; iarq<argc ; iarq++) {
+ if (NAccessLog>=MAXLOGS) {
+ debuga(_("Too many log files passed on command line.\n"));
+ exit(EXIT_FAILURE);
+ }
+ if (strlen(argv[iarq])>=MAX_LOG_FILELEN) {
+ debuga(_("Log file name too long passed on command line: %s\n"),argv[iarq]);
+ exit(EXIT_FAILURE);
+ }
+ strcpy(AccessLog[NAccessLog],argv[iarq]);
+ NAccessLog++;
+ AccessLogFromCmdLine++;
+ }
+ }
+
if(debug) debuga(_("Init\n"));
if(ConfigFile[0] == '\0') snprintf(ConfigFile,sizeof(ConfigFile),"%s/sarg.conf",SYSCONFDIR);
.SH SYNOPSIS
.B sarg
.RI [ options ]
+.I logfile...
.SH DESCRIPTION
\fBsarg\fP is a logfile parser and analyzer for the \fBSquid Web Proxy Cache\fP,
which can be found at \fBhttp://www.squid-cache.org/\fP.
This manual page documents briefly the
.B sarg
-command. More information is available at \fBhttp://sarg.sourceforge.net/\fP.
+command. More information is available at \fBhttp://sarg.sourceforge.net/\fP.
This manual page was originally written for the Debian distribution
because the author didn't include one in favor of documentation
in the GNU Info format; see below.
web server's directory for browsing by users or administrators. You may also
have \fBsarg\fP email the reports to the Squid Cache administrator.
.PP
-\fBsarg\fP can take the \fBsquid\fP access log as its input, or optionally the
-\fBsquidGuard http://www.squidguard.org/\fP Squid filter/redirector logfile format.
+\fBsarg\fP can read \fBsquid\fP or \fBMicorosft ISA\fP access logs. Optionally, it can
+complement the reports with the log of a Squid filter/redirector such as
+\fBsquidGuard (http://www.squidguard.org/)\fP.
.SH OPTIONS
A summary of options is included below.
.TP
.B \-l filename
Uses
.IR "filename"
-as the input log. This option can be repeated up to 255 times to read multiple files. The files must be listed in chronological order from newest to eldest. If the files end with the extension
+as the input log. This option can be repeated up to 255 times to read multiple files. The files must be listed in chronological order from newest to oldest. If the files end with the extension
.IR ".gz" ", " ".bz2" " or " ".Z"
they are decompressed.
If the file name is just
.I -
, the log file is read from standard input. In that case, it cannot be compressed.
+
+This option is kept for compatibility with older versions of sarg but, starting with sarg 2.3, the log files may be named on the command
+line without the
+.B \-l
+option. It allows the use of wildcards on the command line. Make sure you don't exceed the limit of 255 files.
.TP
.B \-L filename
Reads a proxy redirector log file such as one created by squidGuard or Rejik. If you use this option, you may want to configure