Skip to content

Instantly share code, notes, and snippets.

View namedgraph's full-sized avatar

Martynas Jusevičius namedgraph

View GitHub Profile
@namedgraph
namedgraph / server.xml
Last active December 17, 2015 18:49
Tomcat AccessLogValve pattern producing HTTP access logs in RDF Turtle format using HTTP Vocabulary. Configured in server.xml.
<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
<Service name="Catalina">
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".ttl"
pattern="[ a &lt;http://www.w3.org/2011/http#Connection&gt; ; &lt;http://semantic-web.dk/ontologies/http#remoteAuthority&gt; &quot;%a&quot; ; &lt;http://www.w3.org/2011/http#connectionAuthority&gt; &quot;%v:%p&quot; ; &lt;http://www.w3.org/2011/http#requests&gt; ([ a &lt;http://www.w3.org/2011/http#Request&gt; ; &lt;http://purl.org/dc/terms/date&gt; &quot;%{yyyy-MM-dd}tT%{HH:mm:ss}t&quot;^^&lt;http://www.w3.org/2001/XMLSchema#dateTime&gt; ; &lt;http://www.w3.org/2011/http#methodName&gt; &quot;%m&quot; ; &lt;http://www.w3.org/2011/http#mthd&gt; &lt;http://www.w3.org/2011/http-methods#%m&gt; ; &lt;ht