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

Some examples needed for opts #4

Open
yafp opened this issue Mar 24, 2020 · 1 comment
Open

Some examples needed for opts #4

yafp opened this issue Mar 24, 2020 · 1 comment

Comments

@yafp
Copy link

yafp commented Mar 24, 2020

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?

@meshstyles
Copy link

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)
});

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