[systemd-devel] python - reading the journal

2013-02-03 Thread Steven Hiscocks
:) -- Steven Hiscocks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] python - reading the journal

2013-02-04 Thread Steven Hiscocks
On 04/02/13 05:13, David Strauss wrote: I second the interest in committing this to the existing Python support once polished. On Sun, Feb 3, 2013 at 6:07 PM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Sun, Feb 03, 2013 at 09:18:28PM +, Steven Hiscocks wrote: Hi, I've been

Re: [systemd-devel] python - reading the journal

2013-02-04 Thread Steven Hiscocks
On 04/02/13 18:30, Steven Hiscocks wrote: On 04/02/13 05:13, David Strauss wrote: I second the interest in committing this to the existing Python support once polished. On Sun, Feb 3, 2013 at 6:07 PM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Sun, Feb 03, 2013 at 09:18:28PM

Re: [systemd-devel] python - reading the journal

2013-02-05 Thread Steven Hiscocks
On 05/02/13 02:49, Zbigniew Jędrzejewski-Szmek wrote: Hi, On Mon, Feb 04, 2013 at 10:42:02PM +, Steven Hiscocks wrote: I've made the suggested changes and pushed it to github. Feedback welcomed :) Thanks! Some more thoughts on the API below. Some of those are probably stupid, but I want

Re: [systemd-devel] python - reading the journal

2013-02-05 Thread Steven Hiscocks
On 05/02/13 23:00, Zbigniew Jędrzejewski-Szmek wrote: On Tue, Feb 05, 2013 at 09:22:46PM +, Steven Hiscocks wrote: On 05/02/13 02:49, Zbigniew Jędrzejewski-Szmek wrote: Hi, On Mon, Feb 04, 2013 at 10:42:02PM +, Steven Hiscocks wrote: I've made the suggested changes and pushed

Re: [systemd-devel] python - reading the journal

2013-02-08 Thread Steven Hiscocks
On 06/02/13 00:55, Zbigniew Jędrzejewski-Szmek wrote: On Tue, Feb 05, 2013 at 11:45:10PM +, Steven Hiscocks wrote: On 05/02/13 23:00, Zbigniew Jędrzejewski-Szmek wrote: On Tue, Feb 05, 2013 at 09:22:46PM +, Steven Hiscocks wrote: On 05/02/13 02:49, Zbigniew Jędrzejewski-Szmek wrote

Re: [systemd-devel] python - reading the journal

2013-02-08 Thread Steven Hiscocks
On 08/02/13 20:51, Zbigniew Jędrzejewski-Szmek wrote: On Fri, Feb 08, 2013 at 07:51:48PM +, Steven Hiscocks wrote: On 06/02/13 00:55, Zbigniew Jędrzejewski-Szmek wrote: On Tue, Feb 05, 2013 at 11:45:10PM +, Steven Hiscocks wrote: On 05/02/13 23:00, Zbigniew Jędrzejewski-Szmek wrote

Re: [systemd-devel] python - reading the journal

2013-02-15 Thread Steven Hiscocks
On 11/02/13 05:49, Zbigniew Jędrzejewski-Szmek wrote: On Fri, Feb 08, 2013 at 10:20:57PM +, Steven Hiscocks wrote: I thought the easiest way was to just inherit the Journal (now _Journal), replacing __new__ with all the python RunString stuff. https://github.com/kwirk/systemd/commit

Re: [systemd-devel] python - reading the journal

2013-02-18 Thread Steven Hiscocks
of `self.converters[key](value)` exception handling should be limited to `KeyError`? This would mean that the whole log entry would fail to return if one of the converters failed. -- David Strauss | da...@davidstrauss.net | +1 512 577 5827 [mobile] On Fri, Feb 15, 2013 at 9:28 AM, Steven Hiscocks

Re: [systemd-devel] python - reading the journal

2013-02-19 Thread Steven Hiscocks
On 19/02/13 07:05, David Strauss wrote: On Mon, Feb 18, 2013 at 11:28 AM, Steven Hiscocks steven-syst...@hiscocks.me.uk wrote: Sounds good. I suppose `log_level` should become `add_loglevel_matches` for consistency. (or actually `add_priority_matches`?) Log level is the Pythonic language

Re: [systemd-devel] python - reading the journal

2013-02-21 Thread Steven Hiscocks
On 21/02/13 01:49, Zbigniew Jędrzejewski-Szmek wrote: On Tue, Feb 19, 2013 at 09:02:56PM +, Steven Hiscocks wrote: I've pushed a few more commits. I've pushed a few commits to https://github.com/keszybz/systemd/commits/python-systemd-reader This is your tree but rebased onto my id128 stuff

Re: [systemd-devel] python - reading the journal

2013-02-23 Thread Steven Hiscocks
On 23/02/13 00:43, Zbigniew Jędrzejewski-Szmek wrote: On Thu, Feb 21, 2013 at 06:46:35PM +, Steven Hiscocks wrote: On 21/02/13 01:49, Zbigniew Jędrzejewski-Szmek wrote: On Tue, Feb 19, 2013 at 09:02:56PM +, Steven Hiscocks wrote: I've pushed a few more commits. I've pushed a few

Re: [systemd-devel] [systemd-commits] 42 commits - configure.ac Makefile.am man/.gitignore README src/journal src/python-systemd

2013-03-01 Thread Steven Hiscocks
cleanup can be done in the main tree. Thank you for the module! Zbyszek Brilliant. Thank you for your patience, input and contributions. As you may have noticed I'm a bit of a novice when it comes to C and the python C-API,so you assistance was greatly appreciated. -- Steven Hiscocks

[systemd-devel] python-systemd wait bug

2013-04-06 Thread Steven Hiscocks
(self, realtime): Seek to a matching journal entry nearest to `realtime` time. Thanks :) -- Steven Hiscocks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] Python journal reader

2013-04-12 Thread Steven Hiscocks
() +entry['__MONOTONIC_TIMESTAMP'] = self.get_monotonic() +entry['__CURSOR'] = self.get_cursor() + +return entry def query_unique(self, field): Return unique values appearing in the journal for given `field`. ``` Thanks -- Steven Hiscocks

[systemd-devel] Journal issues

2013-04-12 Thread Steven Hiscocks
output in export format. I've seen this issue on two of Arch Linux x86_64 systems. Thanks :) -- Steven Hiscocks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Journal issues

2013-04-12 Thread Steven Hiscocks
On 13/04/13 00:00, Mirco Tischler wrote: 2013/4/12 Steven Hiscocks steven-syst...@hiscocks.me.uk mailto:steven-syst...@hiscocks.me.uk Hi, I'm having two issues in relation to the journal with my recent upgrade to v201. One issue, is that it appears that _MACHINE_ID field

Re: [systemd-devel] Python journal reader

2013-04-13 Thread Steven Hiscocks
'] = self.get_cursor() + +return entry def query_unique(self, field): Return unique values appearing in the journal for given `field`. ``` On Fri, Apr 12, 2013 at 10:13 AM, Steven Hiscocks steven-syst...@hiscocks.me.uk wrote: Hi, In the python journal Reader, the splitting out

Re: [systemd-devel] Python journal reader

2013-04-13 Thread Steven Hiscocks
On 13/04/13 23:47, Steven Hiscocks wrote: On 13/04/13 23:00, David Strauss wrote: If seems like we should put the conditional special handling for __REALTIME_TIMESTAMP and __MONOTONIC_TIMESTAMP in either _reader.c or right in get(). Here's why: * With the code above, calling Reader.get

Re: [systemd-devel] Python journal reader

2013-04-14 Thread Steven Hiscocks
complicated thought...) Hopefully I've covered everything. Feedback welcomed :-) -- Steven Hiscocks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] [PATCH] python-systemd: Reader return special fields and _Reader changes

2013-04-14 Thread Steven Hiscocks
From: Steven Hiscocks ste...@hiscocks.me.uk Changes to _Reader make it match closer to C API, by removing `get_next` and `get_previous`. A `get_all` method added, which returns dictionary of fields using C API SD_JOURNAL_FOREACH_DATA macro, which can be used in conjunction with `next`. _Reader

Re: [systemd-devel] [PATCH] systemd-python: export new sd_journal_{process, get_events, get_timeout}

2013-04-15 Thread Steven Hiscocks
to me :) -- Steven Hiscocks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] [RFC PATCH] systemd-python: add SYSLOG_IDENTIFIER to JournalHandler

2013-04-22 Thread Steven Hiscocks
having the value as `__name__`, but`_sys.argv[0]` if `__name__ == __main__`? -- Steven Hiscocks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] [RFC PATCH] systemd-python: add SYSLOG_IDENTIFIER to JournalHandler

2013-04-22 Thread Steven Hiscocks
On 22/04/13 22:15, Zbigniew Jędrzejewski-Szmek wrote: On Mon, Apr 22, 2013 at 09:53:55PM +0100, Steven Hiscocks wrote: +self._SYSLOG_IDENTIFIER = (_sys.argv[0] + if SYSLOG_IDENTIFIER is None

[systemd-devel] [PATCH] python-systemd: add version number

2013-04-23 Thread Steven Hiscocks
From: Steven Hiscocks ste...@hiscocks.me.uk --- Hi, I thought it would be useful to have a version number in the python systemd module. I'm not overly familiar with Make, etc. but hopefully I've taken the right approach. :) Thanks Steven Hiscocks Makefile.am

Re: [systemd-devel] [PATCH v2] systemd-python: attach fields to JournalHandler, add SYSLOG_IDENTIFIER

2013-04-24 Thread Steven Hiscocks
, CODE_LINE=record.lineno, CODE_FUNC=record.funcName, - **self._extra) + **extra) except Exception: self.handleError(record) -- Steven Hiscocks

Re: [systemd-devel] [PATCH] python-systemd: add version number

2013-04-30 Thread Steven Hiscocks
On 30/04/13 03:33, Zbigniew Jędrzejewski-Szmek wrote: On Tue, Apr 23, 2013 at 08:11:03PM +0100, Steven Hiscocks wrote: From: Steven Hiscocks ste...@hiscocks.me.uk --- Hi, I thought it would be useful to have a version number in the python systemd module. Hi, I haven't replied to this before

Re: [systemd-devel] [PATCH] python-systemd: Reader return special fields and _Reader changes

2013-05-12 Thread Steven Hiscocks
On 14/04/13 20:55, Steven Hiscocks wrote: def get_next(self, skip=1): -Return the next log entry as a dictionary of fields. +Return the next log entry as a mapping type, currently +a standard dictionary of fields. Optional skip value will return the `skip