SHARE
Facebook X Pinterest WhatsApp

Use Logger to Write Messages to Log Files

Written By
thumbnail
Web Webster
Web Webster
Feb 15, 2011

“Want a quick and easy way to write to system logs? Check out
logger, a shell utility that works with syslog.

“The logger utility is part of the bsdutils package on
Debian-based systems and the util-linux-ng package on Fedora (and
presumably Red Hat Enterprise Linux, although I don’t have a RHEL
system handy to check). It should be installed by default.

“The most common use for logger is as a lightweight way to pass
messages from a script to logfiles. Say you’ve got a backup script
or another job that runs while you’re home snoozing. Rather than
having the script send an email and clog up your inbox, you can add
logger to your script, and check periodically, at your leisure, to
make sure things went as planned — or use logger to just log error
messages when the job doesn’t run as planned or encounters an
error.”


Complete Story

thumbnail
Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Recommended for you...

How to Install Immich on openSUSE
r00t
Sep 6, 2024
Beginners Guide for ID Command in Linux
Benny Lanco
Sep 5, 2024
[Fixed] An Unexpected Error Occurred on Gnome Extensions
Patrick
Sep 3, 2024
Run a Google Search From the Linux Command Line With Googler
TechRepublic
Aug 27, 2024
Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.