Sha256: b0e16c128c3e0df1d64c7eca4480ed432cb08da2d4d94a8ba0956ba2d3f8375e

Contents?: true

Size: 1.21 KB

Versions: 27

Compression:

Stored size: 1.21 KB

Contents

/*
	  YMDP LOGGER

		Send logging messages to OIB. 
		
		Messages are saved in log/ymdp.log

*/


/* set asset version */

var LOGGER, Logger;

LOGGER = {
  VERSION: "<%= @hash %>",
  MESSAGE: "<%= @message %>",
  DEPLOYED: <%= Time.now.to_i %>,
  DEPLOYED_STRING: "<%= Time.now.to_s %>"
};

	YAHOO.namespace("logger");

	YAHOO.logger.write = function(level, message) {
		if (YAHOO.oib.login !== undefined) {
			message = "[login: " + YAHOO.oib.login + "] " + message;
		}
		if (YAHOO.oib.guid !== undefined) {
			message = "[guid: " + YAHOO.oib.guid + "] " + message;
		}
	  YAHOO.oib.callOIB("ymdp/log",
	    {
	      level: level,
	      message: message,
	      method: "POST"
	    },
	    function() {
	      // log message written successfully
	  });
	};
	
	YAHOO.logger.debug = function(message) {
	  YAHOO.logger.write("debug", message);
	};
	YAHOO.logger.info = function(message) {
	  YAHOO.logger.write("info", message);
	};
	YAHOO.logger.warn = function(message) {
	  YAHOO.logger.write("warn", message);
	};
	YAHOO.logger.error = function(message) {
	  YAHOO.logger.write("warn", message);
	};
	YAHOO.logger.fatal = function(message) {
	  YAHOO.logger.write("fatal", message);
	};
	

Logger = YAHOO.logger;	

// END YMDP LOGGER

Version data entries

27 entries across 22 versions & 1 rubygems

Version Path
ymdp-0.1.10 spec/data/app/javascripts/logger.js
ymdp-0.1.9 spec/data/app/javascripts/logger.js
ymdp-0.1.8.1 spec/data/app/javascripts/logger.js
ymdp-0.1.8 spec/data/app/javascripts/logger.js
ymdp-0.1.7 spec/data/app/javascripts/logger.js
ymdp-0.1.6 spec/data/app/javascripts/logger.js
ymdp-0.1.4 spec/data/app/javascripts/logger.js
ymdp-0.1.4 lib/new_application/app/javascripts/logger.js
ymdp-0.1.3.2 lib/new_application/app/javascripts/logger.js
ymdp-0.1.3.2 spec/data/app/javascripts/logger.js
ymdp-0.1.3.1 spec/data/app/javascripts/logger.js
ymdp-0.1.3.1 lib/new_application/app/javascripts/logger.js
ymdp-0.1.3 lib/new_application/app/javascripts/logger.js
ymdp-0.1.3 spec/data/app/javascripts/logger.js
ymdp-0.1.1 spec/data/app/javascripts/logger.js
ymdp-0.1.1 lib/new_application/app/javascripts/logger.js
ymdp-0.1.0 lib/new_application/app/javascripts/logger.js
ymdp-0.0.17 lib/new_application/app/javascripts/logger.js
ymdp-0.0.16 lib/new_application/app/javascripts/logger.js
ymdp-0.0.15 lib/new_application/app/javascripts/logger.js