You are not logged in.

#1 2012-12-30 22:37:12

george55
Member
Registered: 2011-08-10
Posts: 38

[SOLVED] How to log an entry in journalctl from the command line

I'm interacting quite a lot with journalctl at the moment. Sometimes my log is full of info and I want to see what happens if I execute a certain command. However, it's difficult to see exactly which lines are being added. So I would like to somehow force a new line (say **** HEYY THERE I'M NOW RUNNING ANOTHER TEST ****), so that it's easy to see which lines are added after this moment.

Is there a way to add an entry to the journal from the command line?

Last edited by george55 (2012-12-30 22:40:47)

Offline

#2 2012-12-30 22:38:10

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,092
Website

Re: [SOLVED] How to log an entry in journalctl from the command line

Use logger from util-linux, or systemd-cat

Offline

#3 2012-12-30 22:40:33

george55
Member
Registered: 2011-08-10
Posts: 38

Re: [SOLVED] How to log an entry in journalctl from the command line

Beautiful. Thanks falconindy!

For future reference:

- pacman -S util-linux
- logger "Add this line"

And we're done!

Offline

Board footer

Powered by FluxBB