Files
git-hooks/testsuite/bin/stdout-logger
Joel Brobecker 8b5d28174e Remove all imports of __future__.print_functions in the testsuite
This commit is the result of running the following command in
the testsuite/ directory:

   $ sed -i '/^from\s\+__future__\s\+import\s\+print_function\s*$/d' \
       `git grep print_function | cut -d: -f1 | sort -u`

Change-Id: Idb18a24f5368434a505af42b347b8f2a1d0481b5
TN: U530-006
2021-11-30 17:58:55 +04:00

31 lines
733 B
Python
Executable File

#!/usr/bin/env python
"""Usage: stdout-logger [-p pri] [-t tag] message
"""
from argparse import ArgumentParser
def stdout_logger():
parser = ArgumentParser()
parser.add_argument(
"-t",
"--tag",
dest="tag",
default="[username]",
help="Mark every line to be logged with the specified TAG.",
)
parser.add_argument(
"-p",
"--priority",
dest="priority",
help="Enter the message into the log with the specified PRIORITY.",
)
parser.add_argument("message", help="The message to be filed in the syslog.")
args = parser.parse_args()
print("SYSLOG: %s: %s" % (args.tag, args.message))
if __name__ == "__main__":
stdout_logger()