I have been thinking about this before and I haven't found an answer on google.

Do you guys know whether there is a ready solution for logging to RDF files (or other writable RDF source) for .NET? Popular frameworks are log4net and NLog, which support extending with appenders and targets respectively. Has anyone implemented such thing using RDF?

Also is there a well known vocabulary for possible log data? Usually that would include log level, message, source, timestamp and more. I have found Sticky logging but it seems unmaintained and not really created for such purpose.


asked 26 Sep '12, 07:47

Tomasz%20Pluskiewicz's gravatar image

Tomasz Plusk...
accept rate: 31%


Interesting idea. I don't know of anything already out there. Seems like it would be easy enough to write some custom appender to the log framework of your choice (log4j, slf4j, logback, whatever) to spit out RDF. But the more interesting question is: why would you want to log to RDF? I'm definitely a supporter of RDF, but just curious how do you see consuming log information in RDF? What would you do with it?

(01 Oct '12, 15:28) harschware ♦ harschware's gravatar image

The reason I consider this is the ease to load the log output graph and perform queries. I believe it would be useful for system maintainers and much easier than setting a RDMBS-backed logging.

(02 Oct '12, 10:30) Tomasz Plusk... Tomasz%20Pluskiewicz's gravatar image

@harschware♦ I'm just reading an article on BigData in eBay: http://server.dzone.com/articles/monitoring-ebay-big-data. Apparently they have a ton of logs and enforce a log format to process it and then do some more stuff. How much easier would it be if they fed their logs database with structured data in the first place. Or owuld it? :)

(22 Nov '12, 08:48) Tomasz Plusk... Tomasz%20Pluskiewicz's gravatar image

The NIF (NLP Interchanged Format) working group has defined RDF logging ontology called RLOG.

permanent link

answered 17 Jan '14, 00:44

fellahst's gravatar image

accept rate: 12%

Given the apparent lack of a pre-built ontology I would suggest you consider writing your own preferably based upon an existing ontology which would give you some of the core stuff you require.

For example the Event Ontology does what the name suggests - models events. You can use this as the basis for logging and then add your own logging specific vocabularly on top of this e.g.

@prefix event: <http://purl.org/NET/c4dm/event.owl#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix tl: <http://purl.org/NET/c4dm/timeline.owl#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix log: <http://example.org/logging#>.

[] a event:Event;
     event:agent [
        a foaf:Agent;
        foaf:name "program.exe";
     event:time [
        a tl:Interval;
        tl:at "2007-10-15T12:00:00"^^xsd:dateTime;
        tl:duration "PT1H"^^xsd:duration;
     log:level log:Debug ;
     log:message "Something happened" ;
     log:threadID 12345 ;
     log:sourceClass "Namespace.Class"

You likely want to have more of a think about what the logging properties would model and be named to cover everything a logging framework can produce.

One thing you should think about is that since RDF is unordered you would probably want to always log the date time as otherwise you'll just have a mass of triples with no notion of what happened when making the logging fairly useless.

permanent link

answered 02 Oct '12, 12:16

Rob%20Vesse's gravatar image

Rob Vesse ♦
accept rate: 29%

edited 02 Oct '12, 12:17

Turtle access log formatter for Apache: http://www.ebremer.com/paladin/pipelogger/2013-04-08

Turtle access log formatter for Tomcat: https://gist.github.com/pumba-lt/5656373

Both use HTTP RDF Vocabulary http://www.w3.org/TR/HTTP-in-RDF10/ plus some custom log properties. It would be nice to have those standardized, perhaps in a separate vocabulary.

permanent link

answered 27 May '13, 07:35

pumba_lt's gravatar image

accept rate: 0%

edited 27 May '13, 07:37

very cool.

(27 May '13, 17:51) harschware ♦ harschware's gravatar image

+1 That is really neat

(28 May '13, 14:30) Rob Vesse ♦ Rob%20Vesse's gravatar image

Take a look at the HTTP RDF Vocabulary


Essentially it provides a means to model HTTP requests and responses as RDF, ideal for web server logs.

permanent link

answered 02 Oct '12, 06:30

William%20Greenly's gravatar image

William Greenly
accept rate: 13%


Interesting, but I am looking more about something harschware suggests. An RDF writer for the common logging libraries like log4net, NLog and such.

(02 Oct '12, 10:27) Tomasz Plusk... Tomasz%20Pluskiewicz's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 26 Sep '12, 07:47

question was seen: 1,865 times

last updated: 17 Jan '14, 00:44