Commit 0aa2b214 authored by Luciano Cauzzi's avatar Luciano Cauzzi

Changed log type

parent 35410c6e
......@@ -40,7 +40,7 @@ class AppPyramidManager:
@staticmethod
def __generate_generic_error__(operation_name: str, exception: Exception):
msg = "An exception occurred while {}: \n{} \n".format(operation_name, exception)
msg = "[PYRAMID]: An exception occurred while {}: \n{} \n".format(operation_name, exception)
logger.error(msg)
logger.exception(exception)
return NetworkResult(success=False, status_code=400, message=msg, result=None)
......@@ -48,10 +48,10 @@ class AppPyramidManager:
@staticmethod
def __manage_response__(status_code: int, operation_name: str, result):
if status_code == 200:
logger.info(operation_name + ": SUCCEED!")
logger.debug("[PYRAMID]" + operation_name + ": SUCCEED!")
return NetworkResult(success=True, status_code=200, message="", result=result)
else:
logger.error(operation_name + ": FAILED!")
logger.error("[PYRAMID]" + operation_name + ": FAILED!")
return NetworkResult(success=False, status_code=status_code, message="", result=None)
def save(self, doc: PyramidDocument) -> NetworkResult:
......
......@@ -3,7 +3,7 @@ import setuptools
setup(
name='network_manager',
version='0.1.4',
version='0.1.5',
packages=setuptools.find_packages(),
dependency_links=['http://github.comune.brescia.it/innovation-that-excites/logger_library#egg=logger_library'],
install_requires=['logger_library', 'dependency_injector', 'requests'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment