From 307a1ca49b6e92b97230f8639bb222b3073c871f Mon Sep 17 00:00:00 2001 From: tierno Date: Thu, 25 Oct 2018 14:27:36 +0200 Subject: [PATCH] change default logging to stdout and info level Change-Id: Ia0b610bd8ccf049d89df83b7c956e8aa043e8f1a Signed-off-by: tierno --- docker/Dockerfile-local | 4 +++- openmanod | 4 +++- osm_ro/openmanod.cfg | 2 +- scripts/RO-start.sh | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile-local b/docker/Dockerfile-local index 7fc62e39..5cc96bba 100644 --- a/docker/Dockerfile-local +++ b/docker/Dockerfile-local @@ -46,6 +46,7 @@ EXPOSE 9090 # RO_DB_OVIM_PORT: default value '3306' # RO_DB_NAME: default value 'mano_db' # RO_DB_OVIM_NAME: default value 'mano_vim_db' +# RO_LOG_FILE: default log to stderr if not defined ENV RO_DB_HOST="" \ RO_DB_OVIM_HOST="" \ @@ -59,6 +60,7 @@ ENV RO_DB_HOST="" \ RO_DB_OVIM_PORT=3306 \ RO_DB_NAME=mano_db \ RO_DB_OVIM_NAME=mano_vim_db \ - OPENMANO_TENANT=osm + OPENMANO_TENANT=osm \ + RO_LOG_LEVEL=DEBUG CMD RO-start.sh diff --git a/openmanod b/openmanod index f842acc7..9e268700 100755 --- a/openmanod +++ b/openmanod @@ -48,7 +48,7 @@ import osm_ro __author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes" __date__ = "$26-aug-2014 11:09:29$" -__version__ = "0.5.79-r589" +__version__ = "0.5.80-r590" version_date = "Oct 2018" database_version = 32 # expected database schema version @@ -168,6 +168,8 @@ if __name__=="__main__": 'RO_DB_OVIM_USER': 'db_ovim_user', 'RO_DB_OVIM_PASSWORD': 'db_ovim_passwd', # 'RO_DB_OVIM_PORT': 'db_ovim_port', + 'RO_LOG_LEVEL': 'log_level', + 'RO_LOG_FILE': 'log_file', } # Configure logging step 1 hostname = socket.gethostname() diff --git a/osm_ro/openmanod.cfg b/osm_ro/openmanod.cfg index 460bd10c..eeefcb89 100644 --- a/osm_ro/openmanod.cfg +++ b/osm_ro/openmanod.cfg @@ -62,7 +62,7 @@ auto_push_VNF_to_VIMs: False # by default True #general logging parameters #choose among: DEBUG, INFO, WARNING, ERROR, CRITICAL -log_level: DEBUG #general log levels for internal logging +log_level: INFO #general log levels for internal logging #standard output is used unless 'log_file' is specify #log_file: /var/log/openmano/openmano.log diff --git a/scripts/RO-start.sh b/scripts/RO-start.sh index 7d442f02..30365d50 100755 --- a/scripts/RO-start.sh +++ b/scripts/RO-start.sh @@ -135,4 +135,5 @@ RO_CONFIG_FILE="/etc/osm/openmanod.cfg" [ -f "$RO_CONFIG_FILE" ] || RO_CONFIG_FILE=$(python -c 'import osm_ro; print(osm_ro.__path__[0])')/openmanod.cfg [ -f "$RO_CONFIG_FILE" ] || ! echo "configuration file 'openmanod.cfg' not found" || exit 1 -openmanod -c "$RO_CONFIG_FILE" --log-file=/var/log/osm/openmano.log --create-tenant=osm +openmanod -c "$RO_CONFIG_FILE" --create-tenant=osm # --log-file=/var/log/osm/openmano.log + -- 2.25.1