# Path: reid/utils/osutils.py
# def mkdir_if_missing(dir_path):
#     try:
#         os.makedirs(dir_path)
#     except OSError as e:
#         if e.errno != errno.EEXIST:
#             raise


import os
import sys
from .osutils import mkdir_if_missing
from __future__ import absolute_import



class Logger(object):
    def __init__(self, fpath=None):
        self.console = sys.stdout
        self.file = None
        if fpath is not None:

# Path: reid/utils/osutils.py
# def mkdir_if_missing(dir_path):
#     try:
#         os.makedirs(dir_path)
#     except OSError as e:
#         if e.errno != errno.EEXIST:
#             raise


# Path: reid/utils/logging.py
import os
import sys
from .osutils import mkdir_if_missing

from __future__ import absolute_import



class Logger(object):
    def __init__(self, fpath=None):
        self.console = sys.stdout
        self.file = None
        if fpath is not None:

            mkdir_if_missing(os.path.dirname(fpath))