Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no work filter #12

Closed
atitoff opened this issue Feb 16, 2019 · 2 comments
Closed

no work filter #12

atitoff opened this issue Feb 16, 2019 · 2 comments

Comments

@atitoff
Copy link

atitoff commented Feb 16, 2019

Hi!
install ok

alex@orangepipcplus:~$ sudo -H  pip3.7 install cysystemd
Collecting cysystemd
  Downloading https://files.pythonhosted.org/packages/b7/64/9ab14a4682c39a5be35d99743f86a9d1b0c8955217bb7957d6af910e880a/cysystemd-1.1.0.tar.gz (193kB)
    100% |████████████████████████████████| 194kB 1.5MB/s
Installing collected packages: cysystemd
  Running setup.py install for cysystemd ... done
Successfully installed cysystemd-1.1.0

Example "Polling records" works fine.
"Read only cron logs" with errors:

Traceback (most recent call last):
  File "/home/alex/CSH/tests/journal.py", line 10, in <module>
    cron_reader.add_filter(rules)
  File "cysystemd/reader.pyx", line 489, in cysystemd.reader.JournalReader.add_filter
  File "cysystemd/reader.pyx", line 122, in __iter__
  File "cysystemd/reader.pyx", line 134, in cysystemd.reader.check_error_code
SystemError: ('Invalid argument', 'EINVAL')

Process finished with exit code 1
@mosquito
Copy link
Owner

Oh it's my mistake. Journal should be opened before adding filter rules.

@mosquito
Copy link
Owner

Readme was fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants