Skip to content

Commit

Permalink
Add verbose logging to galaxy test output handling problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Oct 12, 2015
1 parent 1e7f052 commit 5d7db92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion planemo/cli.py
@@ -1,5 +1,6 @@
import os
import sys
import traceback

import click

Expand Down Expand Up @@ -44,10 +45,12 @@ def log(self, msg, *args):
msg %= args
click.echo(msg, file=sys.stderr)

def vlog(self, msg, *args):
def vlog(self, msg, *args, **kwds):
"""Logs a message to stderr only if verbose is enabled."""
if self.verbose:
self.log(msg, *args)
if kwds.get("exception", False):
traceback.print_exc(file=sys.stderr)

@property
def workspace(self):
Expand Down
2 changes: 1 addition & 1 deletion planemo/galaxy_test/actions.py
Expand Up @@ -92,7 +92,7 @@ def run_in_config(ctx, config, **kwds):
handle.write(build_report.build_report(test_data, report_type=kw_name))

except Exception:
pass
ctx.vlog("Problem producing test output.", exception=True)

__handle_summary(
test_results,
Expand Down

0 comments on commit 5d7db92

Please sign in to comment.