def METHOD_NAME(msg):
    if msg is None:
        return
    msg = _remove_ctrls(msg)
    if msg.strip() == "": return
    if log:
        try:
            log.info(msg.rstrip('\n'))
        except UnicodeError:
            log.warn("Log contains unicode and will not be printed")
    else:
        try:
            print(msg),
        except UnicodeError:
            print("Log contains unicode and will not be printed")