A Reusable Logging Library
Every team script prints messages its own way. Write one library they can all source.
Create /home/student/lib/log.sh defining three functions:
log_info MESSAGE…, log_warn MESSAGE…, log_error MESSAGE…TIMESTAMP [LEVEL] MESSAGE, where TIMESTAMP is the current UTC time like 2026-10-20T14:03:09Z and LEVEL is INFO, WARN or ERRORlog_info and log_warn print to stdout; log_error prints to stderrLOG_LEVEL filters output: info (default) shows everything, warn hides INFO, error shows only ERRORSourcing the file must print nothing, must not exit the caller, and must not change the caller's shell options (for example, no set -e).
About this machine
Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.
Your machine is ready to start
Create a free account to open a machine and get graded.