1. 17 Apr, 2013 6 commits
    • Zbigniew Jędrzejewski-Szmek's avatar
      Report about syntax errors with metadata · e8e581bf
      Zbigniew Jędrzejewski-Szmek authored
      The information about the unit for which files are being parsed
      is passed all the way down. This way messages land in the journal
      with proper UNIT=... or USER_UNIT=... attribution.
      
      'systemctl status' and 'journalctl -u' not displaying those messages
      has been a source of confusion for users, since the journal entry for
      a misspelt setting was often logged quite a bit earlier than the
      failure to start a unit.
      Based-on-a-patch-by: default avatarOleksii Shevchuk <alxchk@gmail.com>
      e8e581bf
    • Zbigniew Jędrzejewski-Szmek's avatar
    • Zbigniew Jędrzejewski-Szmek's avatar
    • Zbigniew Jędrzejewski-Szmek's avatar
      conf-parser: generate 7 parsing functions from a macro · eb3491d9
      Zbigniew Jędrzejewski-Szmek authored
      Those functions were identical, apart from typos. Log message
      is modified to contain the type of destination var (int, double,
      ...). I think this might make it easier to understand why a value
      was rejected (e.g. a minus from an unsigned type).
      eb3491d9
    • Steven Hiscocks's avatar
      python-systemd: Reader return special fields and _Reader changes · 6a58bf41
      Steven Hiscocks authored
      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 `get`, `next`, `get_{realtime,monotonic,cursor}` and new
      `previous` methods are made private. This is so the traversal and
      getting of journal fields can be made transparent in the python
      interface.
      
      Reader now solely implements `get_next` and `get_previous`, returning a
      standard dictionary (future: other mapping types?) with all standard and
      special fields through the converters. This makes the output the same as
      journalctl json/export format output.
      
      Iterator methods also moved to Reader, as they do not function as intend
      with changes to _Reader.
      
      These changes also mean that more optimised journal interfaces can be
      made more easily from _Reader, by avoiding getting of unrequired fields
      by using the `_get` method, and avoiding field conversions.
      6a58bf41
    • Zbigniew Jędrzejewski-Szmek's avatar
      systemd-python: export new sd_journal_{process,get_events,get_timeout} · 76a80d93
      Zbigniew Jędrzejewski-Szmek authored
      get_timeout_ms is added as a convenience function, since
      it is abysmally hard to call clock_gettime() in Python
      versions lower than 3.3. And even for Python 3.3 users
      it saves a few lines.
      76a80d93
  2. 16 Apr, 2013 13 commits
  3. 15 Apr, 2013 13 commits
  4. 14 Apr, 2013 8 commits