mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 19:25:51 +00:00
* Fix RIPD-509, RIPD-514, RIPD-519, RIPD-525, RIPD-527, RIPD-529, RIPD-530 and RIPD-531. * Protect people from ledger-spew and remove cruft. * Better error messages and handling. * Cache command lists or clears ledger cache. * Better ledger summaries. * Offline mode.
22 lines
479 B
Python
22 lines
479 B
Python
from __future__ import absolute_import, division, print_function, unicode_literals
|
|
|
|
import sys
|
|
|
|
VERBOSE = False
|
|
|
|
def out(*args, **kwds):
|
|
kwds.get('print', print)(*args, file=sys.stdout, **kwds)
|
|
|
|
def info(*args, **kwds):
|
|
if VERBOSE:
|
|
out(*args, **kwds)
|
|
|
|
def warn(*args, **kwds):
|
|
out('WARNING:', *args, **kwds)
|
|
|
|
def error(*args, **kwds):
|
|
out('ERROR:', *args, **kwds)
|
|
|
|
def fatal(*args, **kwds):
|
|
raise Exception('FATAL: ' + ' '.join(str(a) for a in args))
|