Writing a logger in Java?

Asked by Stephan Wissel on 2010-07-07

I have a custom Java application I would like send events to the Zeitgeist engine. I understand that the preferred way is to submit events via the DBUs API as described here: http://zeitgeist-project.com/docs/0.4/dbus_api.html

Is there some sample code for Java available to write the correct format and message type to dBus?
How to add a datasource via DBus (or otherwise) didn't see it in the doc.

Question information

Language:
English Edit question
Status:
Answered
For:
Zeitgeist Framework Edit question
Assignee:
No assignee Edit question
Last query:
2010-07-07
Last reply:
2010-07-19

Sorry for the late reply - summer holidays :-)

The "correct" way to do this would be to use the DBus library for Java (hosted somewhere on freedesktop.org I believe) and write complete bindings for the Zeitgeist DBus API, like done for libzeitgeist (see http://people.canonical.com/~kamstrup/projects/libzeitgeist/doc/0.2.2/). This will be somewhat of a detour from you main goal, but would be a highly valued contribution - I may be able to give you some hints along the road if you wanna go there.

Alternatively you can write a simple command line tool in Python (using the zeitgeist Python module with the docs you pointed to), which you then call from Java - not beautiful, but workable until there are full Java bindings ready.

Hope it's enough to help you!

Can you help with this problem?

Provide an answer of your own, or ask Stephan Wissel for more information if necessary.

To post a message you must log in.