def LogMsg(msg):
global headerlogged<EOL>if headerlogged == <NUM_LIT:0>:<EOL><INDENT>print("<STR_LIT>".format(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>"<EOL>))<EOL>print("<STR_LIT>".format("<STR_LIT:->"))<EOL>headerlogged = <NUM_LIT:1><EOL><DEDENT>threadname = threading.currentThread().name<EOL>funcname = sys._getframe(<NUM_LIT:1>).f_code.co_name<EOL>if funcname == "<STR_LIT>":<EOL><INDENT>funcname = "<STR_LIT>"<EOL><DEDENT>elif funcname == "<STR_LIT>":<EOL><INDENT>funcname = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>funcname = "<STR_LIT>".format(funcname)<EOL><DEDENT>if threadname == "<STR_LIT>":<EOL><INDENT>logmsg = "<STR_LIT>".format(<EOL>time.strftime("<STR_LIT>", time.localtime(time.time())),<EOL>"<STR_LIT>".format(funcname, msg)<EOL>)<EOL><DEDENT>else:<EOL><INDENT>logmsg = "<STR_LIT>".format(<EOL>time.strftime("<STR_LIT>", time.localtime(time.time())),<EOL>"<STR_LIT>".format(funcname, msg)<EOL>)<EOL><DEDENT>print(logmsg)<EOL>
Writes a formatted log message with a timestamp to stdout.