Squid -> Logkonfiguration

Gemeinsam ins Internet mit Firewall und Proxy.
Antworten
mod3

Squid -> Logkonfiguration

Beitrag von mod3 » 06.03.2012 13:44:41

Hey Leute!

Nutze einen Squid-Server und bin super zufrieden, habe lediglich ein Problem:
Das Logging.
Derzeit ist es mit folgenden Parametern eingerichtet:

logformat squid %tl %>a %ru %<A

Wie bekomme ich's hin, dass er mir das Datum in einem anderen Format ausgibt? Momentan erhalte ich Datum und Uhrzeit nämlich in folgender Syntax:

Code: Alles auswählen

05/Mar/2012:08:48:47
Möchte das aber mit awk weiterverarbeten und da ist so ein string blöd.
Lieber wäre mir folgendes Format:

Code: Alles auswählen

05 Mar 2012 08:48:47
Damit könnte ich das einfach spaltenweise auslesen.
Wie bringe ich squid das nun bei?

Grüße,
mod3

mod3

Re: Squid -> Logkonfiguration

Beitrag von mod3 » 07.03.2012 16:26:00

Hat niemand eine Lösung für mich?

Cae
Beiträge: 6349
Registriert: 17.07.2011 23:36:39
Wohnort: 2130706433

Re: Squid -> Logkonfiguration

Beitrag von Cae » 17.04.2012 06:09:18

Die Doku [1] ist so gut wie immer hilfreich. Besonders der Abschnitt
Doku [1] hat geschrieben:

Code: Alles auswählen

%{format}tg
    Date of request, strftime format (gmt)
Vielleicht hast du für die Definition (logformat $name …) und Anwendung (access_log /path/to/foo $name) nicht dieselben Bezeichner verwendet. Leider ist nur meine Glaskugel kaputt und mit Informationen wird man nicht gerade erschlagen.

Gruß Cae

[1] http://devel.squid-cache.org/customlog/logformat.html

--Edit: Ouch, ich sehe gerade, der Post ist gut einen Monat her. Naja.
If universal surveillance were the answer, lots of us would have moved to the former East Germany. If surveillance cameras were the answer, camera-happy London, with something like 500,000 of them at a cost of $700 million, would be the safest city on the planet.

—Bruce Schneier

Antworten