Skip to content

Commit

Permalink
logging: logging format from R-Commons
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Rodriguez committed Apr 1, 2019
1 parent 8272b29 commit 77d8ed2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions reana_workflow_engine_yadage/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@
BROKER_URL))

MOUNT_CVMFS = os.getenv('REANA_MOUNT_CVMFS', 'false')

LOGGING_MODULE = 'reana-workflow-engine-yadage'
"""REANA Workflow Engine Yadage logging module."""
4 changes: 2 additions & 2 deletions reana_workflow_engine_yadage/externalbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
from reana_commons.api_client import JobControllerAPIClient as rjc_api_client

from .celeryapp import app
from .config import MOUNT_CVMFS
from .config import LOGGING_MODULE, MOUNT_CVMFS
from .utils import REANAWorkflowStatusPublisher

log = logging.getLogger('yadage.cap.externalproxy')
log = logging.getLogger(LOGGING_MODULE)


def make_oneliner(job):
Expand Down
7 changes: 5 additions & 2 deletions reana_workflow_engine_yadage/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
from yadage.steering_api import steering_ctx
from yadage.utils import setupbackend_fromstring

from .config import SHARED_VOLUME_PATH
from reana_commons.config import REANA_LOG_FORMAT, REANA_LOG_LEVEL

from .config import LOGGING_MODULE, SHARED_VOLUME_PATH
from .tracker import REANATracker
from .utils import REANAWorkflowStatusPublisher

log = logging.getLogger(__name__)
logging.basicConfig(level=REANA_LOG_LEVEL, format=REANA_LOG_FORMAT)
log = logging.getLogger(LOGGING_MODULE)


def load_json(ctx, param, value):
Expand Down
3 changes: 2 additions & 1 deletion reana_workflow_engine_yadage/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
import networkx as nx
from yadage.utils import WithJsonRefEncoder

from .config import LOGGING_MODULE
from .utils import REANAWorkflowStatusPublisher

log = logging.getLogger(__name__)
log = logging.getLogger(LOGGING_MODULE)


def analyze_progress(adageobj):
Expand Down

0 comments on commit 77d8ed2

Please sign in to comment.