Some examples needed for opts
Hi,
i would like to play with the opts
- since
- lines
- filter
- etc
but am unsure how to use them. The readme is not really helpful at that point. For example
const journalctl = new Journalctl('since=yesterday')
or
const journalctl = new Journalctl('--since=yesterday')
is not working. It feels like guessing that this point to me. In case you could explain them i can offer to make a pull request to add those details to the readme to avoid such questions in the future ;)
Bonus question:
is there an equivalent to -b aka --boot?
I recently had to push ssh logs to a server so I had to figure this out a bit. This isn't really all that much help I guess but I hope it's something to get you started. I guess it's worth it to look in the code of the module to see what options can be in the object argument to create a new Journalctl instance
const Journalctl = require('journalctl');
const journalctl = new Journalctl({unit:"sshd"});
journalctl.on('event', (event) => {
console.error(event)
});