Merge pull request #58 from avatao-content/logging

Import the logging modules directly
This commit is contained in:
therealkrispet 2019-06-11 11:08:43 +02:00 committed by GitHub
commit f495ff2d7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 30 additions and 30 deletions

View File

@ -1,6 +1,7 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from functools import wraps from functools import wraps
from watchdog.events import FileSystemEventHandler as FileSystemWatchdogEventHandler from watchdog.events import FileSystemEventHandler as FileSystemWatchdogEventHandler
@ -10,8 +11,6 @@ from tfw.event_handlers import TFWServerUplinkConnector
from tfw.decorators.rate_limiter import RateLimiter from tfw.decorators.rate_limiter import RateLimiter
from tfw.mixins.observer_mixin import ObserverMixin from tfw.mixins.observer_mixin import ObserverMixin
from tfw.config.logs import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,12 +1,12 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from os.path import isdir, exists from os.path import isdir, exists
from tfw.event_handlers import FrontendEventHandlerBase from tfw.event_handlers import FrontendEventHandlerBase
from tfw.mixins.monitor_manager_mixin import MonitorManagerMixin from tfw.mixins.monitor_manager_mixin import MonitorManagerMixin
from tfw.components.directory_monitor import DirectoryMonitor from tfw.components.directory_monitor import DirectoryMonitor
from tfw.config.logs import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,6 +1,7 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from os.path import join as joinpath from os.path import join as joinpath
from os.path import basename from os.path import basename
from os import makedirs from os import makedirs
@ -11,7 +12,6 @@ from dateutil import parser as dateparser
from tfw.event_handlers import FrontendEventHandlerBase from tfw.event_handlers import FrontendEventHandlerBase
from tfw.components.snapshot_provider import SnapshotProvider from tfw.components.snapshot_provider import SnapshotProvider
from tfw.config import TFWENV from tfw.config import TFWENV
from tfw.config.logs import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,9 +1,10 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from tfw.event_handlers import FrontendEventHandlerBase from tfw.event_handlers import FrontendEventHandlerBase
from tfw.crypto import KeyManager, sign_message, verify_message from tfw.crypto import KeyManager, sign_message, verify_message
from tfw.config.logs import logging
from tfw.networking import Scope from tfw.networking import Scope
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,6 +1,7 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from os.path import isfile, join, relpath, exists, isdir, realpath from os.path import isfile, join, relpath, exists, isdir, realpath
from glob import glob from glob import glob
from fnmatch import fnmatchcase from fnmatch import fnmatchcase
@ -9,7 +10,6 @@ from typing import Iterable
from tfw.event_handlers import FrontendEventHandlerBase from tfw.event_handlers import FrontendEventHandlerBase
from tfw.mixins.monitor_manager_mixin import MonitorManagerMixin from tfw.mixins.monitor_manager_mixin import MonitorManagerMixin
from tfw.components.directory_monitor import DirectoryMonitor from tfw.components.directory_monitor import DirectoryMonitor
from tfw.config.logs import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,10 +1,11 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from tfw.event_handlers import FrontendEventHandlerBase from tfw.event_handlers import FrontendEventHandlerBase
from tfw.mixins.monitor_manager_mixin import MonitorManagerMixin from tfw.mixins.monitor_manager_mixin import MonitorManagerMixin
from tfw.components.log_monitor import LogMonitor from tfw.components.log_monitor import LogMonitor
from tfw.config.logs import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,3 +1,4 @@
import logging
from abc import abstractmethod from abc import abstractmethod
from json import loads, dumps from json import loads, dumps
from subprocess import run, PIPE, Popen from subprocess import run, PIPE, Popen
@ -10,7 +11,6 @@ from threading import Thread
from contextlib import suppress from contextlib import suppress
from tfw.event_handlers import EventHandlerBase from tfw.event_handlers import EventHandlerBase
from tfw.config.logs import logging
from .pipe_io_server import PipeIOServer, terminate_process_on_failure from .pipe_io_server import PipeIOServer, terminate_process_on_failure

View File

@ -1,12 +1,12 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from xmlrpc.client import Fault as SupervisorFault from xmlrpc.client import Fault as SupervisorFault
from tfw.event_handlers import FrontendEventHandlerBase from tfw.event_handlers import FrontendEventHandlerBase
from tfw.mixins.supervisor_mixin import SupervisorMixin, SupervisorLogMixin from tfw.mixins.supervisor_mixin import SupervisorMixin, SupervisorLogMixin
from tfw.components.directory_monitor import with_monitor_paused from tfw.components.directory_monitor import with_monitor_paused
from tfw.config.logs import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,12 +1,13 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from tornado.ioloop import IOLoop from tornado.ioloop import IOLoop
from tornado.web import Application from tornado.web import Application
from terminado import TermSocket, SingleTermManager from terminado import TermSocket, SingleTermManager
from tfw.config import TFWENV from tfw.config import TFWENV
from tfw.config.logs import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,12 +1,11 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from abc import ABC from abc import ABC
from re import match from re import match
from shlex import split from shlex import split
from tfw.config.logs import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,10 +1,11 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from tfw.event_handlers import FrontendEventHandlerBase from tfw.event_handlers import FrontendEventHandlerBase
from tfw.components.terminado_mini_server import TerminadoMiniServer from tfw.components.terminado_mini_server import TerminadoMiniServer
from tfw.config import TFWENV from tfw.config import TFWENV
from tfw.config.logs import logging
from tao.config import TAOENV from tao.config import TAOENV
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,6 +0,0 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details.
import logging
logging.basicConfig(level=logging.DEBUG)

View File

@ -1,12 +1,11 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from inspect import currentframe from inspect import currentframe
from typing import Iterable from typing import Iterable
from tfw.config.logs import logging
from .tfw_server_connector import TFWServerConnector from .tfw_server_connector import TFWServerConnector
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,8 +1,9 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from tfw.crypto import KeyManager, verify_message from tfw.crypto import KeyManager, verify_message
from tfw.config.logs import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,13 +1,13 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from collections import defaultdict from collections import defaultdict
from datetime import datetime from datetime import datetime
from transitions import Machine, MachineError from transitions import Machine, MachineError
from tfw.mixins.callback_mixin import CallbackMixin from tfw.mixins.callback_mixin import CallbackMixin
from tfw.config.logs import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,7 +1,7 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
from tfw.config.logs import logging import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,11 +1,11 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
import zmq import zmq
from zmq.eventloop.zmqstream import ZMQStream from zmq.eventloop.zmqstream import ZMQStream
from tfw.config.logs import logging
from .serialization import serialize_tfw_msg, with_deserialize_tfw_msg from .serialization import serialize_tfw_msg, with_deserialize_tfw_msg
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,13 +1,12 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from functools import partial from functools import partial
import zmq import zmq
from zmq.eventloop.zmqstream import ZMQStream from zmq.eventloop.zmqstream import ZMQStream
from tfw.config.logs import logging
from .scope import Scope from .scope import Scope
from .serialization import serialize_tfw_msg, with_deserialize_tfw_msg from .serialization import serialize_tfw_msg, with_deserialize_tfw_msg

View File

@ -1,11 +1,12 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft. # Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import logging
from tornado.web import Application from tornado.web import Application
from tfw.networking import EventHandlerConnector from tfw.networking import EventHandlerConnector
from tfw.config import TFWENV from tfw.config import TFWENV
from tfw.config.logs import logging
from .zmq_websocket_router import ZMQWebSocketRouter from .zmq_websocket_router import ZMQWebSocketRouter

View File

@ -2,11 +2,11 @@
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import json import json
import logging
from tornado.websocket import WebSocketHandler from tornado.websocket import WebSocketHandler
from tfw.networking import Scope from tfw.networking import Scope
from tfw.config.logs import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -1,7 +1,11 @@
import logging
from tornado.ioloop import IOLoop from tornado.ioloop import IOLoop
from tfw.server import TFWServer from tfw.server import TFWServer
logging.basicConfig(level=logging.DEBUG)
if __name__ == '__main__': if __name__ == '__main__':
TFWServer().listen() TFWServer().listen()