Jeg henter ovennævnte linie ud fra en log fil, og for at awstats kan arbejde med den, så skal den vide hvordan log filen er bygget op.
Følgende er hvad de skriver i deres dokumentation:
# Enter here your log format (Must match your web server config. See setup
# instructions in documentation to know how to configure your web server to
# have the required log format).
# Possible values: 1,2,3,4 or "your_own_personalized_log_format"
# 1 - Apache or Lotus Notes/Domino native combined log format (NCSA combined/XLF/ELF log format)
# 2 - Old IIS log format (IIS W3C log format). See FAQ for IIS 6.x.
# 3 - Webstar native log format.
# 4 - Apache or Squid native common log format (NCSA common/CLF log format)
# With LogFormat=4, some features (browsers, os, keywords...) can't work.
# "your_own_personalized_log_format" = If your log is ftp, mail or other format,
# you must use following keys to define the log format string (See FAQ
# for ftp, mail or exotic web log format examples):
# %host Host client name or IP address
# %lognamequot Authenticated login/user with format: "john"
# %logname Authenticated login/user with format: john
# %time1 Date and time with format: [dd/mon/yyyy:hh:mm:ss +0000] or [dd/mon/yyyy:hh:mm:ss]
# %time2 Date and time with format: yyyy-mm-dd hh:mm:ss
# %time3 Date and time with format: Mon dd hh:mm:ss or Mon dd hh:mm:ss yyyy
# %time4 Date and time with unix timestamp format: dddddddddd
# %methodurl Method and URL with format: "GET /index.html HTTP/x.x"
# %methodurlnoprot Method and URL with format: "GET /index.html"
# %method Method with format: GET
# %url URL only with format: /index.html
# %query Query string (used by URLWithQuery option)
# %code Return code status (with format for web log: 999)
# %bytesd Size of document in bytes
# %refererquot Referer page with format: "
http://from.com/from.htm"# %referer Referer page with format:
http://from.com/from.htm# %uabracket User agent with format: [Mozilla/4.0 (compatible, ...)]
# %uaquot User agent with format: "Mozilla/4.0 (compatible, ...)"
# %ua User agent with format: Mozilla/4.0_(compatible...)
# %gzipin mod_gzip compression input bytes: In:XXX
# %gzipout mod_gzip compression output bytes & ratio: Out:YYY:ZZpct.
# %gzipratio mod_gzip compression ratio: ZZpct.
# %deflateratio mod_deflate compression ratio with format: (ZZ)
# %email EMail sender (for mail log)
# %email_r EMail receiver (for mail log)
# %virtualname Web sever virtual hostname. Use this tag when same log
# contains data of several virtual web servers. AWStats
# will discard records not in SiteDomain nor HostAliases
# %cluster If log file is provided from several computers (merged by
# logresolvemerge.pl), use this to define cluster id field.
# %extraX Another field that you plan to use for building a
# personalized report with ExtraSection feature (See later).
# If your log format has some fields not included in this list, use:
# %other Means another not used field
# %otherquot Means another not used double quoted field
Jeg har prøvet at strikke noget sammen, men det virker ikke:
LogFormat= "%time2 %other %other %host %methodurl %url %other %other %other %logname %ua %other %referer %other %code %bytesd"
Det som står på den side, er følgende:
- Date (date)
- Time (time)
- Client IP Address (c-ip)
- Username (cs-username)
- Method (cs-method)
- URI Stem (cs-uri-stem)
- URI Query (cs-uri-query)
- Protocol Status (sc-status)
- Bytes Sent (sc-bytes)
- Protocol Version (cs-version)
- User Agent (cs(User-Agent))
- Referrer (cs(Referrer))
Men denne opbygning er ikke den samme som den log fil jeg har. Derfor skal jeg gerne have nogle til at hjælpe med at finde ud af hvordan log fil strukturen er bygget op ... kan ikke helt selv overskue det.