Skip to content

Commit

Permalink
chore(all): prepare release 0.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Mar 25, 2015
1 parent cbf68de commit 528e044
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This library is part of the [Aurelia](http://www.aurelia.io/) platform and contains a minimal but effective logging mechanism with support for log levels and pluggable log appenders.

> To keep up to date on [Aurelia](http://www.aurelia.io/), please visit and subscribe to [the official blog](http://blog.durandal.io/). If you have questions, we invite you to join us on [our Gitter Channel](https://gitter.im/aurelia/discuss).
> To keep up to date on [Aurelia](http://www.aurelia.io/), please visit and subscribe to [the official blog](http://blog.durandal.io/). If you have questions, we invite you to join us on [![Join the chat at https://gitter.im/aurelia/discuss](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aurelia/discuss?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge).
## Dependencies

Expand Down
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.5",
"version": "0.2.6",
"description": "A minimal but effective logging mechanism with support for log levels and pluggable log appenders.",
"keywords": [
"aurelia",
Expand Down
36 changes: 29 additions & 7 deletions dist/amd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ define(["exports"], function (exports) {

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

/**
* 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
*/

/**
* Creates an instance of Error that aggregates and preserves an innerError.
*
* @class AggregateError
* @constructor
*/
exports.AggregateError = AggregateError;

/**
* Gets an instance of a logger by the Id used when creating.
*
Expand Down Expand Up @@ -32,16 +47,23 @@ define(["exports"], function (exports) {
* @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
*/

function AggregateError(msg, inner) {
if (inner && inner.stack) {
msg += "\n------------------------------------------------\ninner error: " + inner.stack;
}

var err = new Error(msg);
if (inner) {
err.innerError = inner;
}

return err;
}

/**
* Enum specifying the levels of the logger
*
*
* @property levels
* @type Enum
* @for export
Expand Down
36 changes: 29 additions & 7 deletions dist/commonjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ var _prototypeProperties = function (child, staticProps, instanceProps) { if (st

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

/**
* 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
*/

/**
* Creates an instance of Error that aggregates and preserves an innerError.
*
* @class AggregateError
* @constructor
*/
exports.AggregateError = AggregateError;

/**
* Gets an instance of a logger by the Id used when creating.
*
Expand Down Expand Up @@ -31,16 +46,23 @@ exports.addAppender = addAppender;
* @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
*/

function AggregateError(msg, inner) {
if (inner && inner.stack) {
msg += "\n------------------------------------------------\ninner error: " + inner.stack;
}

var err = new Error(msg);
if (inner) {
err.innerError = inner;
}

return err;
}

/**
* Enum specifying the levels of the logger
*
*
* @property levels
* @type Enum
* @for export
Expand Down
29 changes: 24 additions & 5 deletions dist/es6/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,28 @@
* @module logging
*/

/**
* Creates an instance of Error that aggregates and preserves an innerError.
*
* @class AggregateError
* @constructor
*/
export function AggregateError(msg, inner) {
if (inner && inner.stack) {
msg += `\n------------------------------------------------\ninner error: ${inner.stack}`;
}

var err = new Error(msg);
if (inner) {
err.innerError = inner;
}

return err;
}

/**
* Enum specifying the levels of the logger
*
*
* @property levels
* @type Enum
* @for export
Expand All @@ -20,14 +39,14 @@ export var levels = {
debug:4
};

var loggers = {},
var loggers = {},
logLevel = levels.none,
appenders = [],
slice = Array.prototype.slice,
loggerConstructionKey = {};

function log(logger, level, args){
var i = appenders.length,
var i = appenders.length,
current;

args = slice.call(args);
Expand Down Expand Up @@ -82,7 +101,7 @@ function createLogger(id){
var logger = new Logger(id, loggerConstructionKey);

if(appenders.length) {
connectLogger(logger);
connectLogger(logger);
}

return logger;
Expand Down Expand Up @@ -182,4 +201,4 @@ export class Logger {
* @param {string} message The message to log
*/
error(){}
}
}
38 changes: 30 additions & 8 deletions dist/system/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
System.register([], function (_export) {
var _prototypeProperties, _classCallCheck, levels, loggers, logLevel, appenders, slice, loggerConstructionKey, Logger;

/**
* 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
*/

/**
* Creates an instance of Error that aggregates and preserves an innerError.
*
* @class AggregateError
* @constructor
*/

_export("AggregateError", AggregateError);

/**
* Gets an instance of a logger by the Id used when creating.
*
Expand Down Expand Up @@ -32,6 +48,19 @@ System.register([], function (_export) {

_export("setLevel", setLevel);

function AggregateError(msg, inner) {
if (inner && inner.stack) {
msg += "\n------------------------------------------------\ninner error: " + inner.stack;
}

var err = new Error(msg);
if (inner) {
err.innerError = inner;
}

return err;
}

function log(logger, level, args) {
var i = appenders.length,
current;
Expand Down Expand Up @@ -120,16 +149,9 @@ System.register([], function (_export) {

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

/**
* 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
Expand Down
8 changes: 8 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### 0.2.6 (2015-03-24)


#### Features

* **all:** enable error aggregation with new AggregateError ([88073ddb](http://github.com/aurelia/logging/commit/88073ddb7bb3d8c4ec86fb37d42978ae8c1b369f))


### 0.2.5 (2015-02-28)


Expand Down
2 changes: 1 addition & 1 deletion doc/api.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"logging","description":"This library is part of the Aurelia platform and contains a minimal but effective logging mechanism\nwith support for log levels and pluggable log appenders.","classes":[{"name":"Logger","file":"aurelia/logging/src/index.js","line":131,"description":"The logger is essentially responsible for having log statements that appear during debugging but are squelched\nwhen using the build tools, depending on the log level that is set. The available levels are -\n1. none\n2. error\n3. warn\n4. info\n5. debug\n\nYou cannot instantiate the logger directly - you must use the getLogger method instead.","is_constructor":1,"methods":[{"line":154,"description":"Logs a debug message.","name":"debug","params":[{"name":"message","description":"The message to log","type":"String"}]},{"line":162,"description":"Logs info.","name":"info","params":[{"name":"message","description":"The message to log","type":"String"}]},{"line":170,"description":"Logs a warning.","name":"warn","params":[{"name":"message","description":"The message to log","type":"String"}]},{"line":178,"description":"Logs an error.","name":"error","params":[{"name":"message","description":"The message to log","type":"String"}]}],"properties":[],"events":[]}],"methods":[{"file":"aurelia/logging/src/index.js","line":91,"description":"Gets an instance of a logger by the Id used when creating.","name":"getLogger","params":[{"name":"id","description":"The id of the logger you wish to get an instance of.","type":"String"}],"return":{"description":"The instance of the logger, or creates a new logger if none exists for that Id.","type":"Logger"}},{"file":"aurelia/logging/src/index.js","line":103,"description":"Adds an appender capable of processing logs and channeling them to an output.","name":"addAppender","params":[{"name":"appender","description":"An appender instance to begin processing logs with.","type":"Object"}]},{"file":"aurelia/logging/src/index.js","line":120,"description":"Sets the level of the logging for the application loggers","name":"setLevel","params":[{"name":"level","description":"Matches an enum specifying the level of logging.","type":"Number"}]}],"properties":[{"file":"aurelia/logging/src/index.js","line":8,"description":"Enum specifying the levels of the logger","name":"levels","type":"Enum"}],"events":[]}
{"name":"logging","description":"This library is part of the Aurelia platform and contains a minimal but effective logging mechanism\nwith support for log levels and pluggable log appenders.","classes":[{"name":"AggregateError","file":"aurelia/logging/src/index.js","line":8,"description":"Creates an instance of Error that aggregates and preserves an innerError.","is_constructor":1,"methods":[],"properties":[],"events":[]},{"name":"Logger","file":"aurelia/logging/src/index.js","line":150,"description":"The logger is essentially responsible for having log statements that appear during debugging but are squelched\nwhen using the build tools, depending on the log level that is set. The available levels are -\n1. none\n2. error\n3. warn\n4. info\n5. debug\n\nYou cannot instantiate the logger directly - you must use the getLogger method instead.","is_constructor":1,"methods":[{"line":173,"description":"Logs a debug message.","name":"debug","params":[{"name":"message","description":"The message to log","type":"String"}]},{"line":181,"description":"Logs info.","name":"info","params":[{"name":"message","description":"The message to log","type":"String"}]},{"line":189,"description":"Logs a warning.","name":"warn","params":[{"name":"message","description":"The message to log","type":"String"}]},{"line":197,"description":"Logs an error.","name":"error","params":[{"name":"message","description":"The message to log","type":"String"}]}],"properties":[],"events":[]}],"methods":[{"file":"aurelia/logging/src/index.js","line":110,"description":"Gets an instance of a logger by the Id used when creating.","name":"getLogger","params":[{"name":"id","description":"The id of the logger you wish to get an instance of.","type":"String"}],"return":{"description":"The instance of the logger, or creates a new logger if none exists for that Id.","type":"Logger"}},{"file":"aurelia/logging/src/index.js","line":122,"description":"Adds an appender capable of processing logs and channeling them to an output.","name":"addAppender","params":[{"name":"appender","description":"An appender instance to begin processing logs with.","type":"Object"}]},{"file":"aurelia/logging/src/index.js","line":139,"description":"Sets the level of the logging for the application loggers","name":"setLevel","params":[{"name":"level","description":"Matches an enum specifying the level of logging.","type":"Number"}]}],"properties":[{"file":"aurelia/logging/src/index.js","line":27,"description":"Enum specifying the levels of the logger","name":"levels","type":"Enum"}],"events":[]}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-logging",
"version": "0.2.5",
"version": "0.2.6",
"description": "A minimal but effective logging mechanism with support for log levels and pluggable log appenders.",
"keywords": [
"aurelia",
Expand Down

0 comments on commit 528e044

Please sign in to comment.