Files
xahaud/bin/ripple/ledger/Log.py
Tom Ritchford 8dd799aa6f New command line LedgerTool. (RIPD-243)
* Retrieve and process summary or full ledgers.
* Search using arbitrary criteria (any Python function).
* Search using arbitrary formats (any Python function).
* Caches ledgers as .gz files to avoid repeated server requests.
* Handles ledger numbers, ranges, and special names like validated or closed.
2014-08-22 18:10:11 -04:00

20 lines
474 B
Python

from __future__ import absolute_import, division, print_function, unicode_literals
import sys
from ripple.ledger.Args import ARGS
def out(*args, **kwds):
kwds.get('print', print)(*args, file=sys.stdout, **kwds)
def info(*args, **kwds):
if ARGS.verbose:
out(*args, **kwds)
def error(*args, **kwds):
out('ERROR', *args, **kwds)
def fatal(*args, **kwds):
out('FATAL', *args, **kwds)
raise Exception('FATAL: ' + ' '.join(str(a) for a in args))