Logging in Shell Scripts

Intermediate
7m 40s
806
4.6/5

If you want to keep a record of what occurred during an execution of a shell script, you'll want to employ some sort of logging mechanism. In this Lesson, you will learn why you may want to use logging in your shell scripts. You'll also learn about the syslog standard and how to generate messages that conform to that standard. Finally, you'll learn how to create your own custom logging functions.

Learning Objectives

  • Learn how to carry out logging in your shell scripts.
  • Learn about the syslog standard and how to generate messages that conform to that standard.
  • Learn how to create your own custom logging functions.

Intended Audience

This Lesson is intended for anyone looking to learn more about bash scripting and shell programming in Linux.

Prerequisites

To get the most out of this Lesson, you should have some basic knowledge of the command line, but it's not essential.

 

About the Author
Avatar
Jason Cannon, opens in a new tab
Founder, Linux Training Academy
Students
25,504
Courses
61
Learning paths
19

Jason is the founder of the Linux Training Academy as well as the author of "Linux for Beginners" and "Command Line Kung Fu." He has over 20 years of professional Linux experience, having worked for industry leaders such as Hewlett-Packard, Xerox, UPS, FireEye, and Amazon.com. Nothing gives him more satisfaction than knowing he has helped thousands of IT professionals level up their careers through his many books and courses.

Covered Topics