Hacked By AnonymousFox

Current Path : /lib/python2.7/site-packages/hw_cpbackup/util/
Upload File :
Current File : //lib/python2.7/site-packages/hw_cpbackup/util/log.py

"""
Initilazes the logging haandler used during program execution.
Concantenates recorded events to standard-out and designated logfile path.
"""
import logging
from pathlib2 import Path

if not Path.exists(Path('/var/log/hw_cpbackup/hw_cpbackup.log')):
    Path.mkdir(Path('/var/log/hw_cpbackup'))
    Path.touch(Path('/var/log/hw_cpbackup/hw_cpbackup.log'))

# define global logging definitions
stream_handler = logging.StreamHandler()
file_handler = logging.FileHandler(filename="/var/log/hw_cpbackup/hw_cpbackup.log", mode='a')
formatter = logging.Formatter("[HW_CPBACKUP]:[%(asctime)s]:[%(levelname)s]: ==> %(message)s", datefmt='%Y-%m-%d|%H:%M:%S')
stream_handler.setFormatter(fmt=formatter)
file_handler.setFormatter(fmt=formatter)
logger = logging.getLogger(name='hw_cpbackup')
logger.addHandler(hdlr=stream_handler)
logger.addHandler(hdlr=file_handler)
logger.setLevel(level=logging.INFO)

Hacked By AnonymousFox1.0, Coded By AnonymousFox
Warning: unlink(/tmp/138.201.207.117:802): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1

Warning: unlink(/tmp/142.11.217.94): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1

Warning: unlink(/tmp/142.11.217.94:80): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1

Warning: unlink(/tmp/94.217.11.142:80): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1