예제 #1
0
def write_to_log(msg, room_name):
    """
    Writes to log.
    The room name is used to construct a log file name from.
    :param msg: str the message to write to the log.
    :param room_name: str the room name.
    """
    d = time.strftime('%Y-%m-%d')
    file_name = d + '_' + room_name + '.log'
    fh.file_writer(SETTINGS['log_path'], file_name, msg)
예제 #2
0
def write_to_log(msg, room_name):
    """
    Writes to log.
    The room name is used to construct a log file name from.
    :param msg: str the message to write to the log.
    :param room_name: str the room name.
    """
    d = time.strftime('%Y-%m-%d')
    file_name = d + '_' + room_name + '.log'
    fh.file_writer(SETTINGS['log_path'], file_name, msg)
예제 #3
0
파일: pinylib.py 프로젝트: nortxort/pinylib
def write_to_log(msg, room_name):
    """
    Writes chat events to log.
    The room name is used to construct a log file name from.
    :param msg: str the message to write to the log.
    :param room_name: str the room name.
    """
    d = time.strftime('%Y-%m-%d')
    file_name = d + '_' + room_name + '.log'
    path = SETTINGS['config_path'] + room_name + '/logs/'
    fh.file_writer(path, file_name, msg.encode(encoding='UTF-8', errors='ignore'))
예제 #4
0
def write_to_log(msg, room_name):
    """
    Writes chat events to log.
    The room name is used to construct a log file name from.
    :param msg: str the message to write to the log.
    :param room_name: str the room name.
    """
    d = time.strftime('%Y-%m-%d')
    file_name = d + '_' + room_name + '.log'
    path = SETTINGS['config_path'] + room_name + '/logs/'
    fh.file_writer(path, file_name,
                   msg.encode(encoding='UTF-8', errors='ignore'))