Created
September 9, 2021 03:31
-
-
Save TheLonelyGhost/abc2376df29f88e1a8e74f2d673eb7d1 to your computer and use it in GitHub Desktop.
Log user_data output to file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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