def init_logs(path=None,<EOL>target=None,<EOL>logger_name='<STR_LIT:root>',<EOL>level=logging.DEBUG,<EOL>maxBytes=<NUM_LIT:1>*<NUM_LIT>*<NUM_LIT>,<EOL>backupCount=<NUM_LIT:5>,<EOL>application_name='<STR_LIT:default>',<EOL>server_hostname=None,<EOL>fields=None):
log_file = os.path.abspath(<EOL>os.path.join(path, target))<EOL>logger = logging.getLogger(logger_name)<EOL>logger.setLevel(level)<EOL>handler = logging.handlers.RotatingFileHandler(<EOL>log_file, maxBytes=maxBytes, backupCount=backupCount)<EOL>handler.setLevel(level)<EOL>handler.setFormatter(<EOL>JsonFormatter(<EOL>application_name=application_name,<EOL>server_hostname=server_hostname,<EOL>fields=fields))<EOL>logger.addHandler(handler)<EOL>
Initialize the zlogger.

    Sets up a rotating file handler to the specified path and file with
    the given size and backup count limits, sets the default
    application_name, server_hostname, and default/whitelist fields.

    :param path: path to write the log file
    :param target: name of the log file
    :param logger_name: name of the logger (defaults to root)
    :param level: log level for this logger (defaults to logging.DEBUG)
    :param maxBytes: size of the file before rotation (default 1MB)
    :param application_name: app name to add to each log entry
    :param server_hostname: hostname to add to each log entry
    :param fields: default/whitelist fields.
    :type path: string
    :type target: string
    :type logger_name: string
    :type level: int
    :type maxBytes: int
    :type backupCount: int
    :type application_name: string
    :type server_hostname: string
    :type fields: dict