1 00:00:00,000 --> 00:00:11,200 In this video, you'll learn about the logger command. Logger is a command that you can 2 00:00:11,200 --> 00:00:18,160 use to write messages to your standard journaling solution. So it works with systemd journald, 3 00:00:18,160 --> 00:00:23,520 it also works with rsyslog. And it's convenient if you want to write a message from a script. 4 00:00:23,520 --> 00:00:27,480 Because maybe your script is generating an error condition that you want to be logged, 5 00:00:27,480 --> 00:00:33,240 well, logger is what you are going to do. You can use it with the option minus P followed 6 00:00:33,240 --> 00:00:39,919 by a priority to even send messages with a specific priority. Let me show you. So I'm 7 00:00:39,919 --> 00:00:50,439 using logger minus PR. Hello, folks. And that should be doing it. So journal CTL, uppercase 8 00:00:50,439 --> 00:00:56,880 G is showing me who in red. Hello, folks. Now to get a little bit more detail, you might 9 00:00:56,880 --> 00:01:04,760 also want to use journal CTL minus PR so that you can see all errors. And there we 10 00:01:04,760 --> 00:01:10,760 can see that my logger command is nicely added to it. And that's really all there is to know 11 00:01:10,760 --> 00:01:13,519 about the logger command. It's very straightforward.