Ravi Sir's Cards › AWS
echo >&2 vs logger
This comparison card contrasts echo >&2 and logger. echo >&2 is described as to the terminal or file. logger is described as to syslog / journald. The card pairs echo >&2 with interactive tools, and logger with cron and services.
Read card text
What this card says
Logging
echo >&2
To the terminal or file.
logger
To syslog / journald.
Key points
Simple.
Tagged, searchable.
Example
echo msg >&2
Use when
Interactive tools.
Cron and services.