Skip to content

Commit

Permalink
chore(all): prepare release 0.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Feb 28, 2015
1 parent aa0fa2f commit bc21289
Show file tree
Hide file tree
Showing 6 changed files with 285 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-logging",
"version": "0.2.3",
"version": "0.2.4",
"description": "A minimal but effective logging mechanism with support for log levels and pluggable log appenders.",
"keywords": [
"aurelia",
Expand Down
95 changes: 93 additions & 2 deletions dist/amd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,49 @@ define(["exports"], function (exports) {

var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };

var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };

/**
* Gets an instance of a logger by the Id used when creating.
*
* @method getLogger
* @param {string} id The id of the logger you wish to get an instance of.
* @return {Logger} The instance of the logger, or creates a new logger if none exists for that Id.
* @for export
*/
exports.getLogger = getLogger;

/**
* Adds an appender capable of processing logs and channeling them to an output.
*
* @method addAppender
* @param {Object} appender An appender instance to begin processing logs with.
* @for export
*/
exports.addAppender = addAppender;

/**
* Sets the level of the logging for the application loggers
*
* @method setLevel
* @param {Number} level Matches an enum specifying the level of logging.
* @for export
*/
exports.setLevel = setLevel;
/**
* This library is part of the Aurelia platform and contains a minimal but effective logging mechanism
* with support for log levels and pluggable log appenders.
*
* @module logging
*/

/**
* Enum specifying the levels of the logger
*
* @property levels
* @type Enum
* @for export
*/
var levels = exports.levels = {
none: 0,
error: 1,
Expand Down Expand Up @@ -81,7 +121,6 @@ define(["exports"], function (exports) {

return logger;
}

function getLogger(id) {
return loggers[id] || (loggers[id] = createLogger(id));
}
Expand All @@ -100,8 +139,25 @@ define(["exports"], function (exports) {
logLevel = level;
}

/**
* The logger is essentially responsible for having log statements that appear during debugging but are squelched
* when using the build tools, depending on the log level that is set. The available levels are -
* 1. none
* 2. error
* 3. warn
* 4. info
* 5. debug
*
* You cannot instantiate the logger directly - you must use the getLogger method instead.
*
* @class Logger
* @constructor
*/

var Logger = exports.Logger = (function () {
function Logger(id, key) {
_classCallCheck(this, Logger);

if (key !== loggerConstructionKey) {
throw new Error("You cannot instantiate \"Logger\". Use the \"getLogger\" API instead.");
}
Expand All @@ -111,21 +167,53 @@ define(["exports"], function (exports) {

_prototypeProperties(Logger, null, {
debug: {

/**
* Logs a debug message.
*
* @method debug
* @param {string} message The message to log
*/

value: function debug() {},
writable: true,
configurable: true
},
info: {

/**
* Logs info.
*
* @method info
* @param {string} message The message to log
*/

value: function info() {},
writable: true,
configurable: true
},
warn: {

/**
* Logs a warning.
*
* @method warn
* @param {string} message The message to log
*/

value: function warn() {},
writable: true,
configurable: true
},
error: {

/**
* Logs an error.
*
* @method error
* @param {string} message The message to log
*/

value: function error() {},
writable: true,
configurable: true
Expand All @@ -134,5 +222,8 @@ define(["exports"], function (exports) {

return Logger;
})();
exports.__esModule = true;

Object.defineProperty(exports, "__esModule", {
value: true
});
});
95 changes: 93 additions & 2 deletions dist/commonjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,49 @@

var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };

var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };

/**
* Gets an instance of a logger by the Id used when creating.
*
* @method getLogger
* @param {string} id The id of the logger you wish to get an instance of.
* @return {Logger} The instance of the logger, or creates a new logger if none exists for that Id.
* @for export
*/
exports.getLogger = getLogger;

/**
* Adds an appender capable of processing logs and channeling them to an output.
*
* @method addAppender
* @param {Object} appender An appender instance to begin processing logs with.
* @for export
*/
exports.addAppender = addAppender;

/**
* Sets the level of the logging for the application loggers
*
* @method setLevel
* @param {Number} level Matches an enum specifying the level of logging.
* @for export
*/
exports.setLevel = setLevel;
/**
* This library is part of the Aurelia platform and contains a minimal but effective logging mechanism
* with support for log levels and pluggable log appenders.
*
* @module logging
*/

/**
* Enum specifying the levels of the logger
*
* @property levels
* @type Enum
* @for export
*/
var levels = exports.levels = {
none: 0,
error: 1,
Expand Down Expand Up @@ -80,7 +120,6 @@ function createLogger(id) {

return logger;
}

function getLogger(id) {
return loggers[id] || (loggers[id] = createLogger(id));
}
Expand All @@ -99,8 +138,25 @@ function setLevel(level) {
logLevel = level;
}

/**
* The logger is essentially responsible for having log statements that appear during debugging but are squelched
* when using the build tools, depending on the log level that is set. The available levels are -
* 1. none
* 2. error
* 3. warn
* 4. info
* 5. debug
*
* You cannot instantiate the logger directly - you must use the getLogger method instead.
*
* @class Logger
* @constructor
*/

var Logger = exports.Logger = (function () {
function Logger(id, key) {
_classCallCheck(this, Logger);

if (key !== loggerConstructionKey) {
throw new Error("You cannot instantiate \"Logger\". Use the \"getLogger\" API instead.");
}
Expand All @@ -110,21 +166,53 @@ var Logger = exports.Logger = (function () {

_prototypeProperties(Logger, null, {
debug: {

/**
* Logs a debug message.
*
* @method debug
* @param {string} message The message to log
*/

value: function debug() {},
writable: true,
configurable: true
},
info: {

/**
* Logs info.
*
* @method info
* @param {string} message The message to log
*/

value: function info() {},
writable: true,
configurable: true
},
warn: {

/**
* Logs a warning.
*
* @method warn
* @param {string} message The message to log
*/

value: function warn() {},
writable: true,
configurable: true
},
error: {

/**
* Logs an error.
*
* @method error
* @param {string} message The message to log
*/

value: function error() {},
writable: true,
configurable: true
Expand All @@ -133,4 +221,7 @@ var Logger = exports.Logger = (function () {

return Logger;
})();
exports.__esModule = true;

Object.defineProperty(exports, "__esModule", {
value: true
});
Loading

0 comments on commit bc21289

Please sign in to comment.