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
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.
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.
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.