mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-27 07:35:52 +00:00
Log: New logging system.
Right now, all I've done is move the logging function from utils to its own file. I've also refactored it and created some classes. Next step would be to somehow get rid of the trace setting. The Remote class should have nothing to do with logging settings. Perhaps we can keep the setting for backwards compatibility only, but the main way to turn logging on/off or filter logging messages should be through the Log class.
This commit is contained in:
@@ -30,6 +30,7 @@ var RippleError = require('./rippleerror').RippleError;
|
||||
var utils = require('./utils');
|
||||
var sjcl = require('./utils').sjcl;
|
||||
var config = require('./config');
|
||||
var log = require('./log').internal.sub('remote');
|
||||
|
||||
/**
|
||||
Interface to manage the connection to a Ripple server.
|
||||
@@ -358,7 +359,7 @@ Remote.prototype.setSecret = function(account, secret) {
|
||||
|
||||
Remote.prototype._trace = function() {
|
||||
if (this.trace) {
|
||||
utils.logObject.apply(utils, arguments);
|
||||
log.info.apply(log, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user