Skip to content

Instantly share code, notes, and snippets.

@TheLonelyGhost
Created September 9, 2021 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheLonelyGhost/abc2376df29f88e1a8e74f2d673eb7d1 to your computer and use it in GitHub Desktop.
Save TheLonelyGhost/abc2376df29f88e1a8e74f2d673eb7d1 to your computer and use it in GitHub Desktop.
Log user_data output to file
# Send the log output from this script to user-data.log, syslog, and the console
# From: https://alestic.com/2010/12/ec2-user-data-output/
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment