[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xlog-discussion] description of the message format

From: Joop Stakenborg
Subject: [Xlog-discussion] description of the message format
Date: Tue, 8 Jan 2002 19:08:45 +0100

Here is an example how xlog parses a message received by a second
application. Let's take a message which looks like this:


First of all the sting is split into an array
with the help of g_strsplit (part of glib) and the
following array is created:


Then the resulting array is searched for 'field descriptors',
like "program:", "version:" and "call:". The colon is included
in this search. With this example, only the string "wa0eir" is
added to the log, date an time are added by xlog.

So, if we want to add time we use: "time:1231" in the message,
but we also could use: "time:12:31" or "time:12.31", xlog
really does not care about another colon in the message
and the time can be added in any format you like.

The code is in src/remote.c. For an example, see remote/sendtoxlog.c.
Be sure to read remote/README.


Joop PA4TU

reply via email to

[Prev in Thread] Current Thread [Next in Thread]