Skip to content

Instantly share code, notes, and snippets.

@csarven
Created May 27, 2013 13:29
Show Gist options
  • Save csarven/5657055 to your computer and use it in GitHub Desktop.
Save csarven/5657055 to your computer and use it in GitHub Desktop.
Apache LogFormat in RDF Turtle
LogFormat "[\
a http:Request;\
:referrer \"%{Referer}i\";\
:useragent \"%{User-agent}i\";\
:remotehost \"%h\";\
:remotehostip \"%a\";\
:remoteuser \"%u\";\
time:inXSDDateTime \"%{%Y-%m-%dT%T%z}t\";\
:canonicalservername \"%v\";\
:querystring \"%q\";\
:numKArequests %k;\
http:httpVersion \"%H\";\
http:methodName \"%m\";\
:port %p;\
:requestsize %I;\
http:absoluteURI <http://%{Host}i%U>;\
http:absolutePath \"%U\";\
http:authority <http://%{Host}i:%p>\
] http:resp [\
http:statusCodeValue %>s;\
:requesttime %D;\
:responsesizenh %B;\
:responsesize %O;\
:connectionstatus \"%X\"\
] ." logRDF
CustomLog "/var/log/apache2/rdflog" logRDF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment