Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

Script logging

This revision card explains Script logging. A log function. It describes to syslog with a tag. The how-to section notes error priority. An example on the card is read by tag.

Script logging A log function. To syslog with a tag. Error priority. Read by tag.
Script logging · Download PNG
Read card text

What this card says

Why do we need it?

A log function.

log(){ echo "$(date +%T) $*" >&2; }

What is it?

To syslog with a tag.

logger -t backup done

How to do it

Error priority.

logger -p user.err -t backup fail

Example

Read by tag.

journalctl -t backup

See all AWS revision cards