Sha256: a1772b6fd2d1f98c7f82886f30e511e396a8cda524067a8146d2e50cbbf4797d
Contents?: true
Size: 1.87 KB
Versions: 4
Compression:
Stored size: 1.87 KB
Contents
/* Class: Appender Base class for sending/outputting of logging event. */ JLog.Appender = function() {}; JLog.Appender.prototype = { /* Property: layout Layout to use with this appender. */ layout: new JLog.PatternLayout(), /* Property: threshold Appender's internal <Level>. */ threshold: JLog.Level.ALL, /* Method: doAppend Checks and navigates logging events. Logger uses this method as gateway. Parameters: loggingEvent - <LoggingEvent> to append */ doAppend: function(loggingEvent) { if(loggingEvent.level.isGreaterOrEqual(this.threshold)) { this.append(loggingEvent); } }, /* Method: append Virtual method, has to be overloaded by derivative classes to perform actual appending. Parameters: loggingEvent - <LoggingEvent> to append */ append: function(loggingEvent) { JLog.handleError("JLog.Appender: This method has to be implemented by derivative classes!"); }, /* Method: setLayout Set appender's <Layout> Parameters: layout - <Layout> for appender. */ setLayout: function(layout) { if (layout instanceof JLog.Layout) { this.layout = layout; } else { JLog.handleError("Appender.setLayout: layout supplied to " + this.toString() + " is not a subclass of Layout"); } }, /* Method: getLayout Get appender's <Layout> */ getLayout: function() { return this.layout; }, /* Method: setThreshold Set appender's threshold <Level> Parameters: threshold - <Level> for appender. */ setThreshold: function(threshold) { this.threshold = threshold; }, /* Method: getThreshold Get appender's threshold <Level> */ getThreshold: function() { return this.threshold; }, toString: function() { JLog.handleError("Appender.toString: all appenders must override this method"); } };
Version data entries
4 entries across 4 versions & 1 rubygems