Red Hat DIRECTORY SERVER 2.0 - GATEWAY Bedienungsanleitung Seite 58

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 96
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 57
Chapter 7. Logging
This provides us with one particularly useful command: CustomLog. This allows us
to specify what information to record and where to record it for each query/response
at the server. This power comes at the price of almost complete syntactic obscurity at
first glance. But in all honesty it’s not that bad.
Suppose we wanted to record just the following information about each query pro-
cessed by the server:
Time & date
URL requested
Name of system making the request
Whether the request was successful
LoadModule log_config_module modules/mod_log_config.so
CustomLog logs/request.log "%t %U %h %s"
Figure 7-6. httpd.conf: Basic logging of requests
Each of the elements beginning with a percentage character is called an escape code
and is converted into some piece of logged information. A complete list of the codes
is given in Appendix B.
Four escape sequences
%t
The time of the request
%U
The URL requested
%h
The client hostname
%s
Status code of the request
To illustrate what they indicate and what they don’t, we will request three URLs and
note a number of problems in the logged output.
The requested URLs
http://cheese.dept.cam.ac.uk/
http://chalk.dept.cam.ac.uk/
http://cheese.dept.cam.ac.uk/gamma.html
[08/May/2003:10:26:02 +0100] / 131.111.11.148 200
[08/May/2003:10:26:10 +0100] /index.html 131.111.11.148 200
[08/May/2003:10:26:29 +0100] /gamma.html 131.111.11.148 200
Figure 7-7. request.log: The corresponding output
Problems with the output as it stands
54
Seitenansicht 57
1 2 ... 53 54 55 56 57 58 59 60 61 62 63 ... 95 96

Kommentare zu diesen Handbüchern

Keine Kommentare