mirror of
https://github.com/KevinMidboe/delugeClient.git
synced 2025-10-29 12:00:13 +00:00
Re-ordered setup & logging actions/lines
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
import os
|
#!/usr/bin/env python3.6
|
||||||
from sys import path
|
# -*- encoding: utf-8 -*-
|
||||||
|
|
||||||
path.append(os.path.dirname(__file__))
|
from sys import path
|
||||||
|
from os.path import dirname, join
|
||||||
|
|
||||||
path.append(dirname(__file__))
|
path.append(dirname(__file__))
|
||||||
|
|
||||||
@@ -11,12 +12,14 @@ from utils import BASE_DIR, ColorizeFilter
|
|||||||
logger = logging.getLogger('deluge_cli')
|
logger = logging.getLogger('deluge_cli')
|
||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
fh = logging.FileHandler(os.path.join(BASE_DIR, 'deluge_cli.log'))
|
fh = logging.FileHandler(join(BASE_DIR, 'deluge_cli.log'))
|
||||||
fh.setLevel(logging.DEBUG)
|
fh.setLevel(logging.DEBUG)
|
||||||
ch = logging.StreamHandler()
|
ch = logging.StreamHandler()
|
||||||
ch.setLevel(logging.ERROR)
|
ch.setLevel(logging.ERROR)
|
||||||
|
|
||||||
formatter = logging.Formatter('%(asctime)s %(levelname)8s %(name)s | %(message)s')
|
formatter = logging.Formatter('%(asctime)s %(levelname)8s %(name)s | %(message)s')
|
||||||
fh.setFormatter(formatter)
|
fh.setFormatter(formatter)
|
||||||
|
|
||||||
logger.addHandler(fh)
|
logger.addHandler(fh)
|
||||||
logger.addHandler(ch)
|
logger.addHandler(ch)
|
||||||
|
logger.addFilter(ColorizeFilter())
|
||||||
25
setup.py
25
setup.py
@@ -1,6 +1,8 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- encoding: utf-8 -*-
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
from sys import path
|
||||||
import delugeClient
|
from os.path import dirname
|
||||||
|
|
||||||
with open("README.md", "r", encoding="utf-8") as fh:
|
with open("README.md", "r", encoding="utf-8") as fh:
|
||||||
long_description = fh.read()
|
long_description = fh.read()
|
||||||
@@ -21,12 +23,12 @@ setup(
|
|||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
url="https://github.com/kevinmidboe/delugeClient",
|
url="https://github.com/kevinmidboe/delugeClient",
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'colored==1.4.2',
|
'colored',
|
||||||
'deluge-client==1.9.0',
|
'deluge-client',
|
||||||
'docopt==0.6.2',
|
'docopt',
|
||||||
'requests==2.25.1',
|
'requests',
|
||||||
'sshtunnel==0.4.0',
|
'sshtunnel',
|
||||||
'websockets==9.1'
|
'websockets'
|
||||||
],
|
],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
@@ -37,10 +39,5 @@ setup(
|
|||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'delugeclient = delugeClient.__main__:main',
|
'delugeclient = delugeClient.__main__:main',
|
||||||
],
|
],
|
||||||
},
|
}
|
||||||
packages=find_packages(),
|
|
||||||
package_data={
|
|
||||||
'delugeClient': ['default_config.ini'],
|
|
||||||
},
|
|
||||||
python_requires=">=3.6",
|
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user