]> git.ipfire.org Git - thirdparty/sarg.git/log
thirdparty/sarg.git
7 years agoAdd support to decompress xz files master
Frederic Marchal [Sun, 30 Oct 2016 10:53:21 +0000 (11:53 +0100)] 
Add support to decompress xz files

Xz files are supported if liblzma is available when compiling sarg.

8 years agoMerge branch 'master' of ssh://git.code.sf.net/p/sarg/code
Frederic Marchal [Tue, 17 Nov 2015 18:36:29 +0000 (19:36 +0100)] 
Merge branch 'master' of ssh://git.code.sf.net/p/sarg/code

8 years agoExtract the starting date from a parsed log file
Frederic Marchal [Tue, 17 Nov 2015 18:34:44 +0000 (19:34 +0100)] 
Extract the starting date from a parsed log file

The period covered by a parsed log file is coded in its file name but the
start date was not properly saved resulting in reports allegedly generated
for 1900-1-1.

Thanks to Evgeniy Yakushev for reporting this problem.

8 years agoValidate the year extracted from a parsed log file
Frederic Marchal [Tue, 17 Nov 2015 18:30:45 +0000 (19:30 +0100)] 
Validate the year extracted from a parsed log file

A parsed log file name contains the date range covering the log content in
a form like sarg-15062015_0100-15062015_0101.log.gz.

The date was insufficiently validated as any date below 1900 produces
an integer overflow.

8 years agoSplit can uncompress compressed log files to split
Frederic Marchal [Thu, 12 Nov 2015 14:27:40 +0000 (15:27 +0100)] 
Split can uncompress compressed log files to split

Thanks to Evgeniy Yakushev for suggesting that idea.

8 years agoUpdate the comment of the split function
Frederic Marchal [Thu, 12 Nov 2015 14:26:36 +0000 (15:26 +0100)] 
Update the comment of the split function

The split function documentation was still describing the function that
used an external program to uncompress log files.

There is no need to document the changes in the function documentation as
that information is available in git.

8 years agoUpdate the man page
Frederic Marchal [Thu, 12 Nov 2015 14:17:27 +0000 (15:17 +0100)] 
Update the man page

Option -m has been deprecated.

Option -b is not working as it should.

8 years agoUpdate the default limits in sarg.conf
Frederic Marchal [Tue, 10 Nov 2015 17:44:11 +0000 (18:44 +0100)] 
Update the default limits in sarg.conf

There were a few mistakes in the documentation of the user_report_limit and
download_report_limit.

Thanks to Evgeniy Yakushev for reporting this error.

8 years agoInitialize the default value for siteusers_report_limit.
Frederic Marchal [Tue, 10 Nov 2015 17:42:47 +0000 (18:42 +0100)] 
Initialize the default value for siteusers_report_limit.

8 years agoUpdate sarg.conf to reflect the correct default value
Frederic Marchal [Mon, 9 Nov 2015 20:41:37 +0000 (21:41 +0100)] 
Update sarg.conf to reflect the correct default value

per_user_limit_file_create was documented with a non existing option.

8 years agoDon't abort if a host name cannot be resolved into an IP address
Frederic Marchal [Thu, 5 Nov 2015 20:25:23 +0000 (21:25 +0100)] 
Don't abort if a host name cannot be resolved into an IP address

Finding the IP address of a host is not that critical. If it can't be
resolved, keep generating the report.

If the host name cannot be resolved into an IP address, an error message is
printed on stderr.

8 years agoDon't try to resolve aliased host names when creating the datafile
Frederic Marchal [Thu, 5 Nov 2015 20:10:38 +0000 (21:10 +0100)] 
Don't try to resolve aliased host names when creating the datafile

If a host name has been previously replaced by an alias, there is no point
in trying to convert the host name into an IP address if datafile_url is
set to ip (the default value).

8 years agoPrevent a segfault if a host name doesn't resolve to an IP address
Frederic Marchal [Thu, 5 Nov 2015 20:09:31 +0000 (21:09 +0100)] 
Prevent a segfault if a host name doesn't resolve to an IP address

If getaddrinfo fails, the linked list is not initialized. It must therefore
not be freed.

The error occurred when datafile was defined in sarg.conf and datafile_url
was set to ip (the default value).

Thanks to Evgeniy Yakushev for finding and reporting this bug.

8 years agoFix the static and const correctness of a function
Frederic Marchal [Thu, 5 Nov 2015 20:01:39 +0000 (21:01 +0100)] 
Fix the static and const correctness of a function

I happened to stumble on that function that was unnecessarily declared as
global and without using const strings for strings that are not modified.

That's just a style problem.

8 years agoOptimize away a useless strcpy.
Frederic Marchal [Sun, 1 Nov 2015 16:42:20 +0000 (17:42 +0100)] 
Optimize away a useless strcpy.

8 years agoThe reported user agent report date was wrong
Frederic Marchal [Sun, 1 Nov 2015 16:11:32 +0000 (17:11 +0100)] 
The reported user agent report date was wrong

At the top of the user agent report, the period covered by the report was
wrong when the entries were coming from an extended log or when several
useragent.log files were provided with the useragent option in sarg.conf.

Thanks to Evgeniy Yakushev for reporting this bug.

8 years agoCreate a user agent report if the input log provides the information
Frederic Marchal [Sun, 1 Nov 2015 15:23:30 +0000 (16:23 +0100)] 
Create a user agent report if the input log provides the information

An extended log can contain the user agent identification string. Sarg can
now use it to generate the user agent report.

The new user_agent type is added to report_type to generate a user agent
report. For compatibility with previous versions, that report type is
automatically selected if at least one file name is provided with the
useragent option.

8 years agoProduce a user agent log if the information is in the extended log
Frederic Marchal [Sun, 1 Nov 2015 08:21:46 +0000 (09:21 +0100)] 
Produce a user agent log if the information is in the extended log

The extended log can contain the user agent name. If it is available, we
produce the user agent log.

8 years agoUpdate Russian translation.
Frederic Marchal [Sat, 31 Oct 2015 06:19:50 +0000 (07:19 +0100)] 
Update Russian translation.

8 years agoDisplay the correct date in the redirector report
Frederic Marchal [Tue, 20 Oct 2015 17:43:56 +0000 (19:43 +0200)] 
Display the correct date in the redirector report

Due to a typo in the source code, any date in October would be displayed as
month 0, November as month 1 and December as month 2.

Thanks to Evgeniy Yakushev for reporting this bug

8 years agoInitialize LDAP connection after generating the useragent log
Frederic Marchal [Sun, 4 Oct 2015 15:08:49 +0000 (17:08 +0200)] 
Initialize LDAP connection after generating the useragent log

The useragent log doesn't need the connection to the LDAP server. Let's
exclude this task from the connection timeout and have more time to
resolve the user names.

Thanks to Evgeniy Yakushev for spotting that error.

8 years agoAdd a comment to clarify some piece of code.
Frederic Marchal [Sun, 4 Oct 2015 14:45:32 +0000 (16:45 +0200)] 
Add a comment to clarify some piece of code.

8 years agoMake b-tree cache functions static.
Frederic Marchal [Sun, 4 Oct 2015 14:30:20 +0000 (16:30 +0200)] 
Make b-tree cache functions static.

8 years agoAlways display a message when exiting on a failure.
Frederic Marchal [Sun, 4 Oct 2015 14:11:05 +0000 (16:11 +0200)] 
Always display a message when exiting on a failure.

8 years agoUse the proper exit constant instead of the hard coded numérical value.
Frederic Marchal [Sun, 4 Oct 2015 14:09:39 +0000 (16:09 +0200)] 
Use the proper exit constant instead of the hard coded numérical value.

8 years agoTry to reconnect to the LDAP server
Frederic Marchal [Fri, 2 Oct 2015 17:30:12 +0000 (19:30 +0200)] 
Try to reconnect to the LDAP server

If a query fails, we try to connect again to the server just in case it
timed out between two requests. If it fails again, sarg abort the
reporting.

8 years agoMove some doxygen comments into the source file
Frederic Marchal [Fri, 2 Oct 2015 17:25:10 +0000 (19:25 +0200)] 
Move some doxygen comments into the source file

The doxygen documentation is best placed into the source file. It is easier
to spot any discrepancy.

8 years agoInitialize usertab as late as possible
Frederic Marchal [Fri, 2 Oct 2015 17:07:55 +0000 (19:07 +0200)] 
Initialize usertab as late as possible

The usertab option may use LDAP but the connection to the server was open
before parsing the access and useragent logs. It was possible that the
connection would time out before the first request was sent.

An attempt to fix this problem is to open the connection to the LDAP server
after parsing the log files.

8 years agoDraw dependency graphs in doxygen documentation
Frederic Marchal [Fri, 2 Oct 2015 17:03:30 +0000 (19:03 +0200)] 
Draw dependency graphs in doxygen documentation

The caller dependency graph let me quickly see where a function is called
from.

8 years agoUpdate doxygen file
Frederic Marchal [Fri, 2 Oct 2015 16:12:11 +0000 (18:12 +0200)] 
Update doxygen file

File simply updated with

    doxygen -u

8 years agoUpdate the Russian translation.
Frederic Marchal [Sat, 19 Sep 2015 13:54:58 +0000 (15:54 +0200)] 
Update the Russian translation.

8 years agoMerge branch 'HEAD' of ssh://fmarchal@git.code.sf.net/p/sarg/code
Frederic Marchal [Sat, 19 Sep 2015 13:54:11 +0000 (15:54 +0200)] 
Merge branch 'HEAD' of ssh://fmarchal@git.code.sf.net/p/sarg/code

8 years agoThe list of users to include in the report is processed after every aliasing mechanism
Frederic Marchal [Sat, 19 Sep 2015 13:49:12 +0000 (15:49 +0200)] 
The list of users to include in the report is processed after every aliasing mechanism

It is more logical to filter the users to include in the report after they
have been aliased to the final name. It makes it possible to identify the
final user irrespective of the name she happens to have when connecting to
the proxy.

8 years agoTranslate sarg-php into Russian
Frederic Marchal [Thu, 10 Sep 2015 20:14:58 +0000 (22:14 +0200)] 
Translate sarg-php into Russian

Thanks to Evgeniy Yakushev for this translation.

8 years agoUpdate the Russian translation
Frederic Marchal [Thu, 3 Sep 2015 16:01:36 +0000 (18:01 +0200)] 
Update the Russian translation

Thanks to Evgeniy Yakushev for this work.

8 years agoLimit the useragent log period to the same period as the access log
Frederic Marchal [Fri, 21 Aug 2015 17:59:26 +0000 (19:59 +0200)] 
Limit the useragent log period to the same period as the access log

If no explicit date range was provided on the command line, the useragent
report used to contain the content of the whole useragent.log file even if
it covered a wider period than the access log.

Now, the useragent report only covers the same period as the access log
provided they both overlap. If both logs cover distinct periods, the
useragent log is not produced.

8 years agoRewrite the useragent log processing
Frederic Marchal [Fri, 21 Aug 2015 17:24:55 +0000 (19:24 +0200)] 
Rewrite the useragent log processing

Create more functions to distinguish the reading of the useragent log file
from the report generation.

The idea is to prepare the code to read the useragent data from other
sources than the useragent_log option.

8 years agoIgnore empty URL in extended log format
Frederic Marchal [Thu, 20 Aug 2015 18:16:14 +0000 (20:16 +0200)] 
Ignore empty URL in extended log format

The sample log provided here:
https://sourceforge.net/p/sarg/discussion/234317/thread/224c3daa/#a5ca
shows that some lines can have an empty URL.

It looks like it denotes failed connection attempts to unavailable
resources. Instead of aborting the processing, we ignore such lines.

The summary presented when debug output is enabled shows how many lines
have been ignored.

8 years agoHide the alias prefix for the user name
Frederic Marchal [Mon, 27 Jul 2015 18:11:47 +0000 (20:11 +0200)] 
Hide the alias prefix for the user name

When a host name is replaced by an alias, the host name is prefixed with a
* to write it with no link to a special function such as a link to block
that url.

Host name don't need that prefix.

8 years agoImprove the documentation in sarg.conf
Frederic Marchal [Mon, 27 Jul 2015 18:10:21 +0000 (20:10 +0200)] 
Improve the documentation in sarg.conf

Write a more complete documentation about exclusion and alias files.

8 years agoAccept case insensitive regular expressions
Frederic Marchal [Mon, 27 Jul 2015 18:09:38 +0000 (20:09 +0200)] 
Accept case insensitive regular expressions

Such a regex must be suffixed with the lower case "i".

As a consequence, a regex must now be separated from the alias by at least
one space or tab in the definition file.

8 years agoFix a use after free buffer in the regex
Frederic Marchal [Mon, 27 Jul 2015 17:53:58 +0000 (19:53 +0200)] 
Fix a use after free buffer in the regex

A buffer was used after freeing its memory. As a consequence, replacement
operators were not working in regex.

8 years agoFix a comment indentation.
Frederic Marchal [Mon, 27 Jul 2015 17:51:45 +0000 (19:51 +0200)] 
Fix a comment indentation.

8 years agoProcess users in redirector log as those from the access log
Frederic Marchal [Sun, 26 Jul 2015 08:30:03 +0000 (10:30 +0200)] 
Process users in redirector log as those from the access log

Users in the redirector log are include, excluded and aliased as those in
the access.log.

8 years agoPerform the user's ID processing in one function
Frederic Marchal [Sun, 26 Jul 2015 08:15:31 +0000 (10:15 +0200)] 
Perform the user's ID processing in one function

There are quite a lot of options to drive the user's ID or IP address
processing, replace the ID, include or exclude the entry from the report
and so on.

That processing is only applied in full to the access.log. The redirector
and dansguardian logs are much more primitive in comparison.

By moving the processing to one function, I intent to use it everywhere.

8 years agoStrip suffix length is a global variable
Frederic Marchal [Sun, 26 Jul 2015 07:34:42 +0000 (09:34 +0200)] 
Strip suffix length is a global variable

Compute only once the suffix length to strip from the user name and store
it globally.

8 years agoCopy less bytes from the user name
Frederic Marchal [Sun, 26 Jul 2015 06:02:32 +0000 (08:02 +0200)] 
Copy less bytes from the user name

When removing a user suffix, copy and truncate the user name in one call.

8 years agoFix an error introduced when stripping the user domain
Frederic Marchal [Fri, 24 Jul 2015 14:09:20 +0000 (16:09 +0200)] 
Fix an error introduced when stripping the user domain

Several reports such as the download and authentication reports would
fail with an error about unknown user "-".

It has been fixed by choosing a new method to strip the domain.

The change partially reverts some changes made in commit
36a0b94cbcaa8a9899fcc878639945e8787d0fec that were responsible for the
proper user name not being propagated to the intermediary report files.

Thanks to Yakushev Evgeniy for reporting this bug.

8 years agoRead an extended log even if cs-uri is split over several columns
Frederic Marchal [Fri, 24 Jul 2015 07:48:44 +0000 (09:48 +0200)] 
Read an extended log even if cs-uri is split over several columns

Sarg used to require that the visited URL be stored in column cs-uri of the
extended log format. But the URL can be split over the cs-uri-scheme,
cs-host, cs-uri-port, cs-uri-path and cs-uri-query columns.

Sarg detects the columns and re-create the full URL if cs-uri is not
found.

8 years agoInclude sub configuration files
Frederic Marchal [Thu, 23 Jul 2015 19:32:34 +0000 (21:32 +0200)] 
Include sub configuration files

Sarg.conf can include other configuration files with the "include"
directive. It can be used to store common option in one file and create
shorter sarg.conf dedicated to reporting tasks.

8 years agoImprove the documentation for strip_user_suffix
Frederic Marchal [Thu, 23 Jul 2015 15:50:46 +0000 (17:50 +0200)] 
Improve the documentation for strip_user_suffix

Provide a link to the useralias option that can do the same as
strip_user_suffix and much more but is more difficult to set up.

8 years agoStrip the user suffix from the redirector log
Frederic Marchal [Wed, 22 Jul 2015 18:35:23 +0000 (20:35 +0200)] 
Strip the user suffix from the redirector log

User names are also truncated in the suffix is found in the redirector log.

8 years agoStrip a suffix from the user name
Frederic Marchal [Wed, 22 Jul 2015 18:29:00 +0000 (20:29 +0200)] 
Strip a suffix from the user name

Only applied to the access.log file.

Not yet available for the redirector.log.

8 years agoUpdate a translation error in the French messages
Frederic Marchal [Mon, 20 Jul 2015 12:21:09 +0000 (14:21 +0200)] 
Update a translation error in the French messages

The first line in the e-mail report was completely wrong!

8 years agoGenerate a top user email with the same options as the html report
Frederic Marchal [Mon, 20 Jul 2015 12:18:26 +0000 (14:18 +0200)] 
Generate a top user email with the same options as the html report

The produced e-mail is still plain text but it is possible to sort the
entries and limit the number of lines with the same options as the html
report.

The top user list is the only report currently supporting that feature.

8 years agoSplit the top user report generation
Frederic Marchal [Sun, 19 Jul 2015 12:55:31 +0000 (14:55 +0200)] 
Split the top user report generation

Use one function to prepare the top user list and another to generate the
html report.

It is the first step to merge the html and email reports.

8 years agoLimit the number of top users reported in the mail report
Frederic Marchal [Fri, 17 Jul 2015 19:34:17 +0000 (21:34 +0200)] 
Limit the number of top users reported in the mail report

The topuser_num parameter in sarg limits the number of users reported in
the email report. Set it to zero to report every user as was done before.

Thanks to Yakushev Evgeniy for reporting this limitation.

8 years agoProperly limit the redirector log to the date range covered by the access log
Frederic Marchal [Tue, 14 Jul 2015 18:25:59 +0000 (20:25 +0200)] 
Properly limit the redirector log to the date range covered by the access log

If no date range are provided on the command line, the redirector log would
contain the whole content of the blocked log.

This patch limit the content of the redirector log to the date range found
in the access.log.

8 years agoSend email report directly to stdout
Frederic Marchal [Sun, 12 Jul 2015 19:14:59 +0000 (21:14 +0200)] 
Send email report directly to stdout

If the email report must be sent to stdout, do it directly. Don't use
another temporary file simply to output it later to stdout.

8 years agoMake it possible to delete an old temporary directory
Frederic Marchal [Sun, 12 Jul 2015 19:13:43 +0000 (21:13 +0200)] 
Make it possible to delete an old temporary directory

Sarg prepares the report in a the temporary directory. The directory must
be empty before starting the report generation. Deleting an old stray
temporary directory must be made with care to make sure we don't delete
a wrong directory.

The old temporary directory check would not take the email report generated
files into account.

8 years agoFix a sort error when generating an email report
Frederic Marchal [Sun, 12 Jul 2015 19:11:26 +0000 (21:11 +0200)] 
Fix a sort error when generating an email report

A line had been mistakenly deleted from the source code. Generating an
email report was not possible any more.

Thanks to Yakushev Evgeniy for reporting this bug.

8 years agoRemove one unused parameter from the mail function.
Frederic Marchal [Sun, 12 Jul 2015 19:09:47 +0000 (21:09 +0200)] 
Remove one unused parameter from the mail function.

8 years agoSimplify the code to create the report directory
Frederic Marchal [Sun, 12 Jul 2015 18:37:47 +0000 (20:37 +0200)] 
Simplify the code to create the report directory

There were too many string copying in that code and the code path was
needlessly duplicated depending on the type of index tree to generate.

8 years agoDon't delete anything from the temporary directory if unsure
Frederic Marchal [Sun, 12 Jul 2015 17:43:27 +0000 (19:43 +0200)] 
Don't delete anything from the temporary directory if unsure

Sarg must delete any previous stray temporary directory before filling it
with the current log data. But sarg must not just delete any directory and
its content if it isn't ours. Therefore, sarg check the directory content
to make sure that it only contains files that may belong to us.

There was an error in that routine. It would recursively delete directories
found in the candidate temporary directory before making sure the whole
directory content can be safely deleted.

This problem is fixed here.

8 years agoGenerate redirector log even if -d is not given
Frederic Marchal [Sun, 12 Jul 2015 16:24:19 +0000 (18:24 +0200)] 
Generate redirector log even if -d is not given

The redirector log would only be produced if a date range is given on the
command line or redirector_filter_out_date was set in sarg.conf.

This patch makes sarg use the whole redirector log if no date range is
provided.

8 years agoDon't glob the file name "-" that means to read from stdin
Frederic Marchal [Tue, 23 Jun 2015 15:48:12 +0000 (17:48 +0200)] 
Don't glob the file name "-" that means to read from stdin

The special file name "-" must not be globed as the content will be read
from stdin.

This change fix the error message: No files matching "-"

Thanks to Yakushev Evgeniy for reporting this bug.

8 years agoUpdate the configure script and its dependencies
Frederic Marchal [Mon, 22 Jun 2015 20:47:10 +0000 (22:47 +0200)] 
Update the configure script and its dependencies

The configure script was rebuild while trying to find out how to get rid
of gettext 0.19 and use gettext 0.18 instead.

The po/Makefile.in file now on my computer requires gettext 0.18 as
expected but I don't know what I did to achieve that result. I still don't
know what tool is responsible for generating Makefile.in from
Makefile.in.in.

8 years agoRestore support for bzip2 files
Frederic Marchal [Sat, 13 Jun 2015 18:30:39 +0000 (20:30 +0200)] 
Restore support for bzip2 files

Sarg can read log compressed with bzip2 again.

It doesn't use an external program to do that. It relies on the bzlib
library if it is found.

8 years agoRewrite the check for zlib
Frederic Marchal [Sat, 13 Jun 2015 18:23:25 +0000 (20:23 +0200)] 
Rewrite the check for zlib

Use quote characters around arguments.

8 years agoIndent the configure script for more readability.
Frederic Marchal [Sat, 13 Jun 2015 14:45:28 +0000 (16:45 +0200)] 
Indent the configure script for more readability.

8 years agoRemove trailing lone commas in the configure script.
Frederic Marchal [Sat, 13 Jun 2015 14:39:10 +0000 (16:39 +0200)] 
Remove trailing lone commas in the configure script.

8 years agoFile globbing is mandatory but can be disabled
Frederic Marchal [Sat, 13 Jun 2015 14:35:48 +0000 (16:35 +0200)] 
File globbing is mandatory but can be disabled

The configure script requires glob.h to be available by default but allow
the user to disable it.

8 years agoChange a message string.
Frederic Marchal [Sat, 13 Jun 2015 14:05:52 +0000 (16:05 +0200)] 
Change a message string.

8 years agoUse AS_IF in the configure script
Frederic Marchal [Sat, 13 Jun 2015 14:05:33 +0000 (16:05 +0200)] 
Use AS_IF in the configure script

I just found out about that macro that is supposed to make the code more
portable.

The indentation of the AS_IF blocks was a bit changed to use tabs instead
of spaces.

8 years agoRead compressed useragent logs
Frederic Marchal [Thu, 11 Jun 2015 20:08:46 +0000 (22:08 +0200)] 
Read compressed useragent logs

Only gzip files are supported for now.

8 years agoDisplay an error when trying to read a Z file
Frederic Marchal [Thu, 11 Jun 2015 16:25:41 +0000 (18:25 +0200)] 
Display an error when trying to read a Z file

Z compressed files are not supported any longer because I want to use
libraries instead of relying on external processes to parse compressed
files. I haven't found a library or piece of code to read those files.

It is my understanding that the Z format is not used much these days. If
you think otherwise, please open a bug ticket.

8 years agoUse a library to read gzip access.log files
Frederic Marchal [Wed, 10 Jun 2015 19:22:24 +0000 (21:22 +0200)] 
Use a library to read gzip access.log files

LZW compressed files (.Z) are not supported any more until I find out how
to read such a file using a library.

Bzip2 files (.bz2) are not supported yet even thought an untested
non-working code exists in sarg.

8 years agoFails if no file names can be found when file globbing is on
Frederic Marchal [Tue, 9 Jun 2015 18:23:28 +0000 (20:23 +0200)] 
Fails if no file names can be found when file globbing is on

If file globbing is enabled and no files can be found to match the pattern,
sarg must fail as it does when file globbing is disabled (that was how
sarg worked before file globbing was programmed).

It is meant as a safety in case there is a problem with the generated log
files.

8 years agoChange the message saying there is a limit to the number of access_log
Frederic Marchal [Tue, 9 Jun 2015 18:20:44 +0000 (20:20 +0200)] 
Change the message saying there is a limit to the number of access_log

There is no fixed limit on the number of access_log that can be used in
sarg.conf or on the command line except for the available memory.

8 years agoAllow the use of wildcards in the access.log and useragent.log
Frederic Marchal [Tue, 9 Jun 2015 18:17:08 +0000 (20:17 +0200)] 
Allow the use of wildcards in the access.log and useragent.log

A file name can contain * or ? if configure was not run with
--without-glob.

It is possible to see if file globbing was compiled in by running sarg with
-x -V.

8 years agoDon't display the period covered by the logs if it is empty
Frederic Marchal [Tue, 9 Jun 2015 17:45:21 +0000 (19:45 +0200)] 
Don't display the period covered by the logs if it is empty

Sarg outputs a line with the earliest and latest dates found if the logs
but it displays 00/01/00 if no log was found. It is best not to display
anything in that case.

8 years agoDisplay version information after parsing every option
Frederic Marchal [Tue, 9 Jun 2015 17:39:44 +0000 (19:39 +0200)] 
Display version information after parsing every option

The version can be displayed with command line option --version or -V but
it is necessary to parse every option in case -x is provided.

It is intended to display what features are available when -x is passed
along with -V.

8 years agoAdd the stringbuffer.h include file to the cmake file
Frederic Marchal [Sun, 7 Jun 2015 19:08:44 +0000 (21:08 +0200)] 
Add the stringbuffer.h include file to the cmake file

That file has been overlooked.

8 years agoAdd a limit on the size of some string generated with sprintf
Frederic Marchal [Sun, 7 Jun 2015 19:08:11 +0000 (21:08 +0200)] 
Add a limit on the size of some string generated with sprintf

This is to avoid a buffer overflow.

8 years agoAccept multiple useragent logs
Frederic Marchal [Sun, 7 Jun 2015 19:07:20 +0000 (21:07 +0200)] 
Accept multiple useragent logs

Command line option -b can be repeated to add more useragent logs.

The useragent_log configuration option can be repeated multiple time to
scan several files.

8 years agoRename configure.in as configure.ac
Frederic Marchal [Mon, 25 May 2015 18:45:47 +0000 (20:45 +0200)] 
Rename configure.in as configure.ac

Automake 1.14 will deprecate configure.in. Only configure.ac will be
accepted and processed.

Git doesn't show it at all but nothing was changed inside the file itself.
Only its name was changed.

8 years agoRead the useragent log even if no report date is specified
Frederic Marchal [Mon, 25 May 2015 18:14:05 +0000 (20:14 +0200)] 
Read the useragent log even if no report date is specified

The useragent log was ignored if the report date was not defined on the
command line. The only way to generate the useragent log was to use
command line option -d.

8 years agoTake the useragent log file into account
Frederic Marchal [Mon, 25 May 2015 18:10:53 +0000 (20:10 +0200)] 
Take the useragent log file into account

The useragent log file provided on the command line with option -b was
ignored.

Thanks to Yakushev Evgeniy for reporting this bug.

8 years agoFix a spelling error in the name of libgd.
Frederic Marchal [Fri, 8 May 2015 17:14:29 +0000 (19:14 +0200)] 
Fix a spelling error in the name of libgd.

8 years agoUpdate the xgettext definition of debuga
Frederic Marchal [Sun, 26 Apr 2015 15:54:47 +0000 (17:54 +0200)] 
Update the xgettext definition of debuga

xgettext needs to know what argument of debuga is a c-format string to add
the proper flag in the po file. The printf-like argument changed place when
the source file and line number were added to debuga.

Function debugaz was not declared as a function taking a printf like
argument.

8 years agoDisplay the source of the message displayed on stderr
Frederic Marchal [Sun, 26 Apr 2015 15:52:54 +0000 (17:52 +0200)] 
Display the source of the message displayed on stderr

Messages that have been merged in previous commits cannot be distinguished
from each other. It makes debugging more difficult.

To solve this problem, when sarg is run with -zzz, the source file name
and the line number is displayed in the message prefix. It makes it easy to
look at the corresponding source code and understand why the message was
printed.

8 years agoTell the compiler that debuga_more uses printf like arguments.
Frederic Marchal [Sun, 26 Apr 2015 15:08:07 +0000 (17:08 +0200)] 
Tell the compiler that debuga_more uses printf like arguments.

8 years agoMinor message content adjustments.
Frederic Marchal [Sun, 26 Apr 2015 14:40:52 +0000 (16:40 +0200)] 
Minor message content adjustments.

8 years agoPut double quotes around remaining file names in messages
Frederic Marchal [Sun, 26 Apr 2015 14:40:09 +0000 (16:40 +0200)] 
Put double quotes around remaining file names in messages

Be consistent with the naming of files in messages. It makes life easier
for the translators.

8 years agoFix a message (missing colon).
Frederic Marchal [Sun, 26 Apr 2015 12:14:59 +0000 (14:14 +0200)] 
Fix a message (missing colon).

8 years agoMerge messages about memory shortage.
Frederic Marchal [Sun, 26 Apr 2015 12:14:18 +0000 (14:14 +0200)] 
Merge messages about memory shortage.

8 years agoMerge messages about IP addresses.
Frederic Marchal [Sun, 26 Apr 2015 12:00:36 +0000 (14:00 +0200)] 
Merge messages about IP addresses.

8 years agoMake the script to change copyright date executable.
Frederic Marchal [Sun, 26 Apr 2015 11:32:27 +0000 (13:32 +0200)] 
Make the script to change copyright date executable.

8 years agoMerge messages
Frederic Marchal [Sun, 26 Apr 2015 11:32:06 +0000 (13:32 +0200)] 
Merge messages

These messages are related to file manipulation.

8 years agoMerge the messages about invalid data
Frederic Marchal [Sun, 26 Apr 2015 11:30:40 +0000 (13:30 +0200)] 
Merge the messages about invalid data

There were far too many redundant messages to be translated just to report
errors in the data read from a file. The messages have been merged to
reduce the diversity in vocabulary.