<reponame>gadams999/greengrassv2-components
import sys
import datetime

message = f"Hello, {sys.argv[1]}! Current time: {str(datetime.datetime.now())}."

# Print the message to stdout.
print(message)


# Append the message to the log file.
with open("/tmp/Greengrass_HelloWorld.log", "a") as f:
    print(message, file=f)

import sys
import datetime

message = f"Hello, {sys.argv[1]}! Current time: {str(datetime.datetime.now())}."

# Print the message to stdout.
print(message)


# Append the message to the log file.
with open("/tmp/Greengrass_HelloWorld.log", "a") as f:
    print(message, file=f)
# Print the message to stdout. # Append the message to the log file.