diff --git a/coapthon/server/coap.py b/coapthon/server/coap.py index 5a52102..150c17d 100644 --- a/coapthon/server/coap.py +++ b/coapthon/server/coap.py @@ -16,15 +16,18 @@ from coapthon.messages.request import Request from coapthon.messages.response import Response from coapthon.resources.resource import Resource from coapthon.serializer import Serializer -from coapthon.utils import Tree +from coapthon.utils import Tree, create_logging import collections __author__ = 'Giacomo Tanganelli' -logger = logging.getLogger(__name__) +if not os.path.isfile("logging.conf"): + create_logging() +logger = logging.getLogger(__name__) +logging.config.fileConfig("logging.conf", disable_existing_loggers=False) class CoAP(object): """