]> git.ipfire.org Git - thirdparty/sarg.git/blame - documentation/log.txt
Rename configure.in as configure.ac
[thirdparty/sarg.git] / documentation / log.txt
CommitLineData
2357ef77
FM
1/*! \file log.c
2\brief Program entry point
3*/
4
5/*! \fn int main(int argc,char *argv[])
6Entry point of the program. See the man page for the accepted parameters.
7
8\param argc The number of arguments passed in \a argv to the program.
9\param argv The arguments passed to the program.
10
11This function parse and process the program's options.
12
13It also parse and read the log file to analyse.
14
448f27de
FM
15\section ReadAccessLog Reading of the access log file
16
17Sarg detects the type of log that is provided. Although sarg can process multiple
18log files in one pass, they must be all of the same type. You cannot mix logs from
19different applications in one single run.
20
21\subsection SquidAccessLog Reading the squid access.log file
22
23Sarg only understand the format of the default squid log file.
24
25\subsection IisAccessLog Reading the IIS log file
26
27Sarg recognize this type of log by the first line. It starts with
28the string "#Software: Mic" without the quotes. Then sarg searches for a line
29indicating the columns found in the file. It extracts the column number of the
30columns it needs to produce the report.
31
32\section UserUnsortLog Output files
33
34The data are written in files with the \c unsort extension and named after the
35user whose access line is processed. It contains the following columns separated
36by one space:
37
38\arg The day of the access.
39\arg The time of the access.
40\arg The user ID.
41\arg The IP address of the user.
42\arg The number of bytes transfered.
43\arg The HTTP code of the server to the request.
44\arg The time spent in that request.
45\arg The smart filter information (?).
46
47Moreover, any URL classified as a download is written in the \c download.unsort file
48with the following columns:
49
50\arg The day of the download.
51\arg The time of the download.
52\arg The user ID.
53\arg The IP address of the user.
54\arg The full URL of the downloaded file.
55
56Any URL returning the HTTP code 403 (forbidden access) is reported in the file
57\c denied.log.unsort with the following columns:
58
59\arg The day of the access.
60\arg The time of the access.
61\arg The user ID.
62\arg The IP address of the user.
63\arg The URL that was rejected.
64
65Any URL returning the HTTP code 401 (unauthorized) or 407 (?) is reported in the file
66\c authfail.log.unsort with the following columns:
67
68\arg The day of the access.
69\arg The time of the access.
70\arg The user ID.
71\arg The IP address of the user.
72\arg The URL that was rejected.
73
74
2357ef77
FM
75*/
76
77
78
79
80
81/*! \fn static void getusers(const char *pwdfile, int debug)
82Read the user ID from a passwd file and merge them in :userfile.
83
84\param pwdfile The name of the passwd file to read. The columns are separated by colons and
85only the first column is kept.
86\param debug Set to \c true to print debug informations.
87
88\bug This function is obviously intented to provide a list of user ID for get_usertab_name()
89but the names are not stored in a way that is usable by that function.
90*/
91