Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aurelia-logging

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aurelia-logging - npm Package Compare versions

Comparing version 1.0.0-beta.1.2.1 to 1.0.0-beta.2.0.0

.eslintrc.json

2

bower.json
{
"name": "aurelia-logging",
"version": "1.0.0-beta.1.2.1",
"version": "1.0.0-beta.2.0.0",
"description": "A minimal but effective logging mechanism with support for log levels and pluggable log appenders.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -5,3 +5,3 @@ var path = require('path');

exports.base = function() {
return {
var config = {
filename: '',

@@ -15,7 +15,11 @@ filenameRelative: '',

compact: false,
code:true,
presets: [ 'es2015-loose', 'stage-1'],
code: true,
presets: [ 'es2015-loose', 'stage-1' ],
plugins: [
'syntax-flow',
'transform-decorators-legacy',
]
};
if (!paths.useTypeScriptForDTS) {
config.plugins.push(
['babel-dts-generator', {

@@ -26,7 +30,9 @@ packageName: paths.packageName,

suppressComments: false,
memberOutputFilter: /^_.*/
}],
'transform-flow-strip-types'
]
memberOutputFilter: /^_.*/,
suppressAmbientDeclaration: true
}]
);
};
config.plugins.push('transform-flow-strip-types');
return config;
}

@@ -57,1 +63,7 @@

};
exports['native-modules'] = function() {
var options = exports.base();
options.presets[0] = 'es2015-loose-native-modules';
return options;
}

@@ -17,2 +17,34 @@ var path = require('path');

packageName: pkg.name
};var path = require('path');
var fs = require('fs');
// hide warning //
var emitter = require('events');
emitter.defaultMaxListeners = 20;
var appRoot = 'src/';
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var paths = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: 'dist/',
doc:'./doc',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/',
packageName: pkg.name,
ignore: [],
useTypeScriptForDTS: false,
importsToAdd: [],
sort: false
};
paths.files = [
'index.js'
].map(function(file){
return paths.root + file;
});
module.exports = paths;

@@ -6,44 +6,102 @@ var gulp = require('gulp');

var compilerOptions = require('../babel-options');
var compilerTsOptions = require('../typescript-options');
var assign = Object.assign || require('object.assign');
var through2 = require('through2');
var concat = require('gulp-concat');
var insert = require('gulp-insert');
var rename = require('gulp-rename');
var tools = require('aurelia-tools');
var ts = require('gulp-typescript');
var gutil = require('gulp-util');
var gulpIgnore = require('gulp-ignore');
var merge = require('merge2');
var jsName = paths.packageName + '.js';
var compileToModules = ['es2015', 'commonjs', 'amd', 'system', 'native-modules'];
gulp.task('build-index', function(){
return gulp.src(paths.root + 'index.js')
.pipe(rename(jsName))
function cleanGeneratedCode() {
return through2.obj(function(file, enc, callback) {
file.contents = new Buffer(tools.cleanGeneratedCode(file.contents.toString('utf8')));
this.push(file);
return callback();
});
}
gulp.task('build-index', function() {
var importsToAdd = paths.importsToAdd.slice();
var src = gulp.src(paths.files);
if (paths.sort) {
src = src.pipe(tools.sortFiles());
}
if (paths.ignore) {
paths.ignore.forEach(function(filename){
src = src.pipe(gulpIgnore.exclude(filename));
});
}
return src.pipe(through2.obj(function(file, enc, callback) {
file.contents = new Buffer(tools.extractImports(file.contents.toString('utf8'), importsToAdd));
this.push(file);
return callback();
}))
.pipe(concat(jsName))
.pipe(insert.transform(function(contents) {
return tools.createImportBlock(importsToAdd) + contents;
}))
.pipe(gulp.dest(paths.output));
});
gulp.task('build-es2015', function () {
return gulp.src(paths.output + jsName)
.pipe(to5(assign({}, compilerOptions.es2015())))
.pipe(gulp.dest(paths.output + 'es2015'));
});
function gulpFileFromString(filename, string) {
var src = require('stream').Readable({ objectMode: true });
src._read = function() {
this.push(new gutil.File({ cwd: paths.appRoot, base: paths.output, path: filename, contents: new Buffer(string) }))
this.push(null)
}
return src;
}
gulp.task('build-commonjs', function () {
return gulp.src(paths.output + jsName)
.pipe(to5(assign({}, compilerOptions.commonjs())))
.pipe(gulp.dest(paths.output + 'commonjs'));
});
function srcForBabel() {
return merge(
gulp.src(paths.output + jsName),
gulpFileFromString(paths.output + 'index.js', "export * from './" + paths.packageName + "';")
);
}
gulp.task('build-amd', function () {
return gulp.src(paths.output + jsName)
.pipe(to5(assign({}, compilerOptions.amd())))
.pipe(gulp.dest(paths.output + 'amd'));
});
function srcForTypeScript() {
return gulp
.src(paths.output + paths.packageName + '.js')
.pipe(rename(function (path) {
if (path.extname == '.js') {
path.extname = '.ts';
}
}));
}
gulp.task('build-system', function () {
return gulp.src(paths.output + jsName)
.pipe(to5(assign({}, compilerOptions.system())))
.pipe(gulp.dest(paths.output + 'system'));
compileToModules.forEach(function(moduleType){
gulp.task('build-babel-' + moduleType, function () {
return srcForBabel()
.pipe(to5(assign({}, compilerOptions[moduleType]())))
.pipe(cleanGeneratedCode())
.pipe(gulp.dest(paths.output + moduleType));
});
if (moduleType === 'native-modules') return; // typescript doesn't support the combination of: es5 + native modules
gulp.task('build-ts-' + moduleType, function () {
var tsProject = ts.createProject(
compilerTsOptions({ module: moduleType, target: moduleType == 'es2015' ? 'es2015' : 'es5' }), ts.reporter.defaultReporter());
var tsResult = srcForTypeScript().pipe(ts(tsProject));
return tsResult.js
.pipe(gulp.dest(paths.output + moduleType));
});
});
gulp.task('build-dts', function(){
return gulp.src(paths.output + paths.packageName + '.d.ts')
.pipe(rename(paths.packageName + '.d.ts'))
.pipe(gulp.dest(paths.output + 'es2015'))
.pipe(gulp.dest(paths.output + 'commonjs'))
.pipe(gulp.dest(paths.output + 'amd'))
.pipe(gulp.dest(paths.output + 'system'));
gulp.task('build-dts', function() {
var tsProject = ts.createProject(
compilerTsOptions({ removeComments: false, target: "es2015", module: "es2015" }), ts.reporter.defaultReporter());
var tsResult = srcForTypeScript().pipe(ts(tsProject));
return tsResult.dts
.pipe(gulp.dest(paths.output));
});

@@ -55,6 +113,20 @@

'build-index',
['build-es2015', 'build-commonjs', 'build-amd', 'build-system'],
'build-dts',
compileToModules
.map(function(moduleType) { return 'build-babel-' + moduleType })
.concat(paths.useTypeScriptForDTS ? ['build-dts'] : []),
callback
);
});
gulp.task('build-ts', function(callback) {
return runSequence(
'clean',
'build-index',
'build-babel-native-modules',
compileToModules
.filter(function(moduleType) { return moduleType !== 'native-modules' })
.map(function(moduleType) { return 'build-ts-' + moduleType })
.concat(paths.useTypeScriptForDTS ? ['build-dts'] : []),
callback
);
});
var gulp = require('gulp');
var paths = require('../paths');
var typedoc = require('gulp-typedoc');
var typedocExtractor = require('gulp-typedoc-extractor');
var runSequence = require('run-sequence');
var through2 = require('through2');
gulp.task('doc-generate', function(){
return gulp.src([paths.output + '*.d.ts', paths.doc + '/core-js.d.ts', './jspm_packages/npm/*/*.d.ts'])
return gulp.src([paths.output + paths.packageName + '.d.ts'])
.pipe(typedoc({
target: 'es6',
includeDeclarations: true,
moduleResolution: 'node',
json: paths.doc + '/api.json',

@@ -21,5 +22,17 @@ name: paths.packageName + '-docs',

gulp.task('doc-extract', function(){
gulp.task('doc-shape', function(){
return gulp.src([paths.doc + '/api.json'])
.pipe(typedocExtractor(paths.packageName))
.pipe(through2.obj(function(file, enc, callback) {
var json = JSON.parse(file.contents.toString('utf8')).children[0];
json = {
name: paths.packageName,
children: json.children,
groups: json.groups
};
file.contents = new Buffer(JSON.stringify(json));
this.push(file);
return callback();
}))
.pipe(gulp.dest(paths.doc));

@@ -31,5 +44,5 @@ });

'doc-generate',
'doc-extract',
'doc-shape',
callback
);
});

@@ -17,8 +17,11 @@ System.config({

map: {
"babel": "npm:babel-core@5.8.25",
"babel-runtime": "npm:babel-runtime@5.8.25",
"core-js": "npm:core-js@2.0.3",
"babel": "npm:babel-core@5.8.38",
"babel-runtime": "npm:babel-runtime@5.8.38",
"core-js": "npm:core-js@2.4.0",
"github:jspm/nodelibs-assert@0.1.0": {
"assert": "npm:assert@1.3.0"
"assert": "npm:assert@1.4.1"
},
"github:jspm/nodelibs-buffer@0.1.0": {
"buffer": "npm:buffer@3.6.0"
},
"github:jspm/nodelibs-path@0.1.0": {

@@ -28,3 +31,3 @@ "path-browserify": "npm:path-browserify@0.0.0"

"github:jspm/nodelibs-process@0.1.2": {
"process": "npm:process@0.11.2"
"process": "npm:process@0.11.4"
},

@@ -34,13 +37,24 @@ "github:jspm/nodelibs-util@0.1.0": {

},
"npm:assert@1.3.0": {
"npm:assert@1.4.1": {
"assert": "github:jspm/nodelibs-assert@0.1.0",
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
"process": "github:jspm/nodelibs-process@0.1.2",
"util": "npm:util@0.10.3"
},
"npm:babel-runtime@5.8.25": {
"npm:babel-runtime@5.8.38": {
"process": "github:jspm/nodelibs-process@0.1.2"
},
"npm:core-js@2.0.3": {
"npm:buffer@3.6.0": {
"base64-js": "npm:base64-js@0.0.8",
"child_process": "github:jspm/nodelibs-child_process@0.1.0",
"fs": "github:jspm/nodelibs-fs@0.1.2",
"ieee754": "npm:ieee754@1.1.6",
"isarray": "npm:isarray@1.0.0",
"process": "github:jspm/nodelibs-process@0.1.2"
},
"npm:core-js@2.4.0": {
"fs": "github:jspm/nodelibs-fs@0.1.2",
"path": "github:jspm/nodelibs-path@0.1.0",
"process": "github:jspm/nodelibs-process@0.1.2",
"systemjs-json": "github:systemjs/plugin-json@0.1.0"
"systemjs-json": "github:systemjs/plugin-json@0.1.2"
},

@@ -53,3 +67,3 @@ "npm:inherits@2.0.1": {

},
"npm:process@0.11.2": {
"npm:process@0.11.4": {
"assert": "github:jspm/nodelibs-assert@0.1.0"

@@ -56,0 +70,0 @@ },

@@ -11,7 +11,3 @@ define(['exports'], function (exports) {

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

@@ -114,3 +110,3 @@ var logLevel = exports.logLevel = {

function Logger(id, key) {
_classCallCheck(this, Logger);

@@ -117,0 +113,0 @@ if (key !== loggerConstructionKey) {

@@ -1,150 +0,148 @@

declare module 'aurelia-logging' {
/**
* Specifies the available logging levels.
*/
export declare interface LogLevel {
/**
* Specifies the available logging levels.
*/
export interface LogLevel {
/**
* No logging.
*/
none: number;
/**
* Log only error messages.
*/
error: number;
/**
* Log warnings messages or above.
*/
warn: number;
/**
* Log informational messages or above.
*/
info: number;
/**
* Log all messages.
*/
debug: number;
}
* No logging.
*/
none: number;
/**
* Implemented by classes which wish to append log data to a target data store.
*/
export interface Appender {
/**
* Appends a debug log.
*
* @param logger The source logger.
* @param rest The data to log.
*/
debug(logger: Logger, ...rest: any[]): void;
/**
* Appends an info log.
*
* @param logger The source logger.
* @param rest The data to log.
*/
info(logger: Logger, ...rest: any[]): void;
/**
* Appends a warning log.
*
* @param logger The source logger.
* @param rest The data to log.
*/
warn(logger: Logger, ...rest: any[]): void;
/**
* Appends an error log.
*
* @param logger The source logger.
* @param rest The data to log.
*/
error(logger: Logger, ...rest: any[]): void;
}
* Log only error messages.
*/
error: number;
/**
* Specifies the available logging levels.
*/
* Log warnings messages or above.
*/
warn: number;
/**
* Specifies the available logging levels.
*/
export const logLevel: LogLevel;
* Log informational messages or above.
*/
info: number;
/**
* Gets the instance of a logger associated with a particular id (or creates one if it doesn't already exist).
*
* @param id The id of the logger you wish to get an instance of.
* @return The instance of the logger, or creates a new logger if none exists for that id.
*/
export function getLogger(id: string): Logger;
* Log all messages.
*/
debug: number;
}
/**
* Implemented by classes which wish to append log data to a target data store.
*/
export declare interface Appender {
/**
* Adds an appender capable of processing logs and channeling them to an output.
*
* @param appender An appender instance to begin processing logs with.
*/
* Appends a debug log.
*
* @param logger The source logger.
* @param rest The data to log.
*/
debug(logger: Logger, ...rest: any[]): void;
/**
* Adds an appender capable of processing logs and channeling them to an output.
*
* @param appender An appender instance to begin processing logs with.
*/
export function addAppender(appender: Appender): void;
* Appends an info log.
*
* @param logger The source logger.
* @param rest The data to log.
*/
info(logger: Logger, ...rest: any[]): void;
/**
* Sets the level of logging for the application loggers.
*
* @param level Matches a value of logLevel specifying the level of logging.
*/
export function setLevel(level: number): void;
* Appends a warning log.
*
* @param logger The source logger.
* @param rest The data to log.
*/
warn(logger: Logger, ...rest: any[]): void;
/**
* A logger logs messages to a set of appenders, depending on the log level that is set.
*/
export class Logger {
/**
* The id that the logger was created with.
*/
id: string;
/**
* You cannot instantiate the logger directly - you must use the getLogger method instead.
*/
constructor(id: string, key: Object);
/**
* Logs a debug message.
*
* @param message The message to log.
*/
debug(message: string): void;
/**
* Logs info.
*
* @param message The message to log.
*/
info(message: string): void;
/**
* Logs a warning.
*
* @param message The message to log.
*/
warn(message: string): void;
/**
* Logs an error.
*
* @param message The message to log.
*/
error(message: string): void;
}
* Appends an error log.
*
* @param logger The source logger.
* @param rest The data to log.
*/
error(logger: Logger, ...rest: any[]): void;
}
/**
* Specifies the available logging levels.
*/
/**
* Specifies the available logging levels.
*/
export declare const logLevel: LogLevel;
/**
* Gets the instance of a logger associated with a particular id (or creates one if it doesn't already exist).
*
* @param id The id of the logger you wish to get an instance of.
* @return The instance of the logger, or creates a new logger if none exists for that id.
*/
export declare function getLogger(id: string): Logger;
/**
* Adds an appender capable of processing logs and channeling them to an output.
*
* @param appender An appender instance to begin processing logs with.
*/
/**
* Adds an appender capable of processing logs and channeling them to an output.
*
* @param appender An appender instance to begin processing logs with.
*/
export declare function addAppender(appender: Appender): void;
/**
* Sets the level of logging for the application loggers.
*
* @param level Matches a value of logLevel specifying the level of logging.
*/
export declare function setLevel(level: number): void;
/**
* A logger logs messages to a set of appenders, depending on the log level that is set.
*/
export declare class Logger {
/**
* The id that the logger was created with.
*/
id: string;
/**
* You cannot instantiate the logger directly - you must use the getLogger method instead.
*/
constructor(id: string, key: Object);
/**
* Logs a debug message.
*
* @param message The message to log.
*/
debug(message: string): void;
/**
* Logs info.
*
* @param message The message to log.
*/
info(message: string): void;
/**
* Logs a warning.
*
* @param message The message to log.
*/
warn(message: string): void;
/**
* Logs an error.
*
* @param message The message to log.
*/
error(message: string): void;
}

@@ -0,1 +1,2 @@

/**

@@ -2,0 +3,0 @@ * Specifies the available logging levels.

@@ -10,4 +10,4 @@ 'use strict';

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

@@ -109,3 +109,3 @@ none: 0,

function Logger(id, key) {
_classCallCheck(this, Logger);

@@ -112,0 +112,0 @@ if (key !== loggerConstructionKey) {

'use strict';
System.register([], function (_export, _context) {
"use strict";
var logLevel, loggers, currentLevel, appenders, slice, loggerConstructionKey, Logger;
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}

@@ -118,3 +116,3 @@ function log(logger, level, args) {

function Logger(id, key) {
_classCallCheck(this, Logger);

@@ -121,0 +119,0 @@ if (key !== loggerConstructionKey) {

@@ -1,831 +0,1 @@

{
"id": 2,
"name": "\"aurelia-logging\"",
"kind": 2,
"kindString": "Module",
"flags": {},
"children": [
{
"id": 26,
"name": "Logger",
"kind": 128,
"kindString": "Class",
"flags": {
"isExported": true
},
"comment": {
"shortText": "A logger logs messages to a set of appenders, depending on the log level that is set."
},
"children": [
{
"id": 28,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
"flags": {
"isExported": true
},
"comment": {
"shortText": "You cannot instantiate the logger directly - you must use the getLogger method instead."
},
"signatures": [
{
"id": 29,
"name": "new Logger",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {},
"comment": {
"shortText": "You cannot instantiate the logger directly - you must use the getLogger method instead."
},
"parameters": [
{
"id": 30,
"name": "id",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 31,
"name": "key",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "reference",
"name": "Object"
}
}
],
"type": {
"type": "reference",
"name": "Logger",
"id": 26,
"moduleName": "\"aurelia-logging\""
}
}
]
},
{
"id": 27,
"name": "id",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "The id that the logger was created with."
},
"type": {
"type": "instrinct",
"name": "string"
}
},
{
"id": 32,
"name": "debug",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 33,
"name": "debug",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Logs a debug message."
},
"parameters": [
{
"id": 34,
"name": "message",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The message to log.\n"
},
"type": {
"type": "instrinct",
"name": "string"
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
},
{
"id": 41,
"name": "error",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 42,
"name": "error",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Logs an error."
},
"parameters": [
{
"id": 43,
"name": "message",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The message to log.\n"
},
"type": {
"type": "instrinct",
"name": "string"
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
},
{
"id": 35,
"name": "info",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 36,
"name": "info",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Logs info."
},
"parameters": [
{
"id": 37,
"name": "message",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The message to log.\n"
},
"type": {
"type": "instrinct",
"name": "string"
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
},
{
"id": 38,
"name": "warn",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 39,
"name": "warn",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Logs a warning."
},
"parameters": [
{
"id": 40,
"name": "message",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The message to log.\n"
},
"type": {
"type": "instrinct",
"name": "string"
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
}
],
"groups": [
{
"title": "Constructors",
"kind": 512,
"children": [
28
]
},
{
"title": "Properties",
"kind": 1024,
"children": [
27
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
32,
41,
35,
38
]
}
]
},
{
"id": 9,
"name": "Appender",
"kind": 256,
"kindString": "Interface",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Implemented by classes which wish to append log data to a target data store."
},
"children": [
{
"id": 10,
"name": "debug",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 11,
"name": "debug",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Appends a debug log."
},
"parameters": [
{
"id": 12,
"name": "logger",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The source logger."
},
"type": {
"type": "reference",
"name": "Logger",
"id": 26
}
},
{
"id": 13,
"name": "rest",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isRest": true
},
"comment": {
"text": "The data to log.\n"
},
"type": {
"type": "instrinct",
"isArray": true,
"name": "any"
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
},
{
"id": 22,
"name": "error",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 23,
"name": "error",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Appends an error log."
},
"parameters": [
{
"id": 24,
"name": "logger",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The source logger."
},
"type": {
"type": "reference",
"name": "Logger",
"id": 26
}
},
{
"id": 25,
"name": "rest",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isRest": true
},
"comment": {
"text": "The data to log.\n"
},
"type": {
"type": "instrinct",
"isArray": true,
"name": "any"
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
},
{
"id": 14,
"name": "info",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 15,
"name": "info",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Appends an info log."
},
"parameters": [
{
"id": 16,
"name": "logger",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The source logger."
},
"type": {
"type": "reference",
"name": "Logger",
"id": 26
}
},
{
"id": 17,
"name": "rest",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isRest": true
},
"comment": {
"text": "The data to log.\n"
},
"type": {
"type": "instrinct",
"isArray": true,
"name": "any"
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
},
{
"id": 18,
"name": "warn",
"kind": 2048,
"kindString": "Method",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 19,
"name": "warn",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Appends a warning log."
},
"parameters": [
{
"id": 20,
"name": "logger",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The source logger."
},
"type": {
"type": "reference",
"name": "Logger",
"id": 26
}
},
{
"id": 21,
"name": "rest",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isRest": true
},
"comment": {
"text": "The data to log.\n"
},
"type": {
"type": "instrinct",
"isArray": true,
"name": "any"
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
}
],
"groups": [
{
"title": "Methods",
"kind": 2048,
"children": [
10,
22,
14,
18
]
}
]
},
{
"id": 3,
"name": "LogLevel",
"kind": 256,
"kindString": "Interface",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Specifies the available logging levels."
},
"children": [
{
"id": 8,
"name": "debug",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Log all messages."
},
"type": {
"type": "instrinct",
"name": "number"
}
},
{
"id": 5,
"name": "error",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Log only error messages."
},
"type": {
"type": "instrinct",
"name": "number"
}
},
{
"id": 7,
"name": "info",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Log informational messages or above."
},
"type": {
"type": "instrinct",
"name": "number"
}
},
{
"id": 4,
"name": "none",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "No logging."
},
"type": {
"type": "instrinct",
"name": "number"
}
},
{
"id": 6,
"name": "warn",
"kind": 1024,
"kindString": "Property",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Log warnings messages or above."
},
"type": {
"type": "instrinct",
"name": "number"
}
}
],
"groups": [
{
"title": "Properties",
"kind": 1024,
"children": [
8,
5,
7,
4,
6
]
}
]
},
{
"id": 44,
"name": "logLevel",
"kind": 32,
"kindString": "Variable",
"flags": {
"isExported": true
},
"comment": {
"shortText": "Specifies the available logging levels."
},
"type": {
"type": "reference",
"name": "LogLevel",
"id": 3,
"moduleName": "\"aurelia-logging\""
}
},
{
"id": 48,
"name": "addAppender",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 49,
"name": "addAppender",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Adds an appender capable of processing logs and channeling them to an output."
},
"parameters": [
{
"id": 50,
"name": "appender",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "An appender instance to begin processing logs with.\n"
},
"type": {
"type": "reference",
"name": "Appender",
"id": 9,
"moduleName": "\"aurelia-logging\""
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
},
{
"id": 45,
"name": "getLogger",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 46,
"name": "getLogger",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Gets the instance of a logger associated with a particular id (or creates one if it doesn't already exist).",
"returns": "The instance of the logger, or creates a new logger if none exists for that id.\n"
},
"parameters": [
{
"id": 47,
"name": "id",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "The id of the logger you wish to get an instance of."
},
"type": {
"type": "instrinct",
"name": "string"
}
}
],
"type": {
"type": "reference",
"name": "Logger",
"id": 26,
"moduleName": "\"aurelia-logging\""
}
}
]
},
{
"id": 51,
"name": "setLevel",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 52,
"name": "setLevel",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Sets the level of logging for the application loggers."
},
"parameters": [
{
"id": 53,
"name": "level",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "Matches a value of logLevel specifying the level of logging.\n"
},
"type": {
"type": "instrinct",
"name": "number"
}
}
],
"type": {
"type": "instrinct",
"name": "void"
}
}
]
}
],
"groups": [
{
"title": "Classes",
"kind": 128,
"children": [
26
]
},
{
"title": "Interfaces",
"kind": 256,
"children": [
9,
3
]
},
{
"title": "Variables",
"kind": 32,
"children": [
44
]
},
{
"title": "Functions",
"kind": 64,
"children": [
48,
45,
51
]
}
]
}
{"name":"aurelia-logging","children":[{"id":25,"name":"Logger","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"A logger logs messages to a set of appenders, depending on the log level that is set."},"children":[{"id":27,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{"shortText":"You cannot instantiate the logger directly - you must use the getLogger method instead."},"signatures":[{"id":28,"name":"new Logger","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"shortText":"You cannot instantiate the logger directly - you must use the getLogger method instead."},"parameters":[{"id":29,"name":"id","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}},{"id":30,"name":"key","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Object"}}],"type":{"type":"reference","name":"Logger","id":25}}]},{"id":26,"name":"id","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The id that the logger was created with."},"type":{"type":"instrinct","name":"string"}},{"id":31,"name":"debug","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":32,"name":"debug","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Logs a debug message."},"parameters":[{"id":33,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The message to log.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"void"}}]},{"id":40,"name":"error","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":41,"name":"error","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Logs an error."},"parameters":[{"id":42,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The message to log.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"void"}}]},{"id":34,"name":"info","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":35,"name":"info","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Logs info."},"parameters":[{"id":36,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The message to log.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"void"}}]},{"id":37,"name":"warn","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":38,"name":"warn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Logs a warning."},"parameters":[{"id":39,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The message to log.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"void"}}]}],"groups":[{"title":"Constructors","kind":512,"children":[27]},{"title":"Properties","kind":1024,"children":[26]},{"title":"Methods","kind":2048,"children":[31,40,34,37]}]},{"id":8,"name":"Appender","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Implemented by classes which wish to append log data to a target data store."},"children":[{"id":9,"name":"debug","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":10,"name":"debug","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Appends a debug log."},"parameters":[{"id":11,"name":"logger","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The source logger."},"type":{"type":"reference","name":"Logger","id":25}},{"id":12,"name":"rest","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The data to log.\n"},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"instrinct","name":"void"}}]},{"id":21,"name":"error","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":22,"name":"error","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Appends an error log."},"parameters":[{"id":23,"name":"logger","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The source logger."},"type":{"type":"reference","name":"Logger","id":25}},{"id":24,"name":"rest","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The data to log.\n"},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"instrinct","name":"void"}}]},{"id":13,"name":"info","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":14,"name":"info","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Appends an info log."},"parameters":[{"id":15,"name":"logger","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The source logger."},"type":{"type":"reference","name":"Logger","id":25}},{"id":16,"name":"rest","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The data to log.\n"},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"instrinct","name":"void"}}]},{"id":17,"name":"warn","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":18,"name":"warn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Appends a warning log."},"parameters":[{"id":19,"name":"logger","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The source logger."},"type":{"type":"reference","name":"Logger","id":25}},{"id":20,"name":"rest","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The data to log.\n"},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"instrinct","name":"void"}}]}],"groups":[{"title":"Methods","kind":2048,"children":[9,21,13,17]}]},{"id":2,"name":"LogLevel","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Specifies the available logging levels."},"children":[{"id":7,"name":"debug","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Log all messages."},"type":{"type":"instrinct","name":"number"}},{"id":4,"name":"error","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Log only error messages."},"type":{"type":"instrinct","name":"number"}},{"id":6,"name":"info","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Log informational messages or above."},"type":{"type":"instrinct","name":"number"}},{"id":3,"name":"none","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"No logging."},"type":{"type":"instrinct","name":"number"}},{"id":5,"name":"warn","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Log warnings messages or above."},"type":{"type":"instrinct","name":"number"}}],"groups":[{"title":"Properties","kind":1024,"children":[7,4,6,3,5]}]},{"id":43,"name":"logLevel","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Specifies the available logging levels."},"type":{"type":"reference","name":"LogLevel","id":2}},{"id":47,"name":"addAppender","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":48,"name":"addAppender","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds an appender capable of processing logs and channeling them to an output."},"parameters":[{"id":49,"name":"appender","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"An appender instance to begin processing logs with.\n"},"type":{"type":"reference","name":"Appender","id":8}}],"type":{"type":"instrinct","name":"void"}}]},{"id":44,"name":"getLogger","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":45,"name":"getLogger","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the instance of a logger associated with a particular id (or creates one if it doesn't already exist).","returns":"The instance of the logger, or creates a new logger if none exists for that id.\n"},"parameters":[{"id":46,"name":"id","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The id of the logger you wish to get an instance of."},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Logger","id":25}}]},{"id":50,"name":"setLevel","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":51,"name":"setLevel","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Sets the level of logging for the application loggers."},"parameters":[{"id":52,"name":"level","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"Matches a value of logLevel specifying the level of logging.\n"},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"instrinct","name":"void"}}]}],"groups":[{"title":"Classes","kind":128,"children":[25]},{"title":"Interfaces","kind":256,"children":[8,2]},{"title":"Variables","kind":32,"children":[43]},{"title":"Functions","kind":64,"children":[47,44,50]}]}
{
"name": "aurelia-logging",
"version": "1.0.0-beta.1.2.1",
"version": "1.0.0-beta.2.0.0",
"description": "A minimal but effective logging mechanism with support for log levels and pluggable log appenders.",

@@ -16,2 +16,3 @@ "keywords": [

"main": "dist/commonjs/aurelia-logging.js",
"typings": "dist/aurelia-logging.d.ts",
"repository": {

@@ -36,36 +37,47 @@ "type": "git",

"devDependencies": {
"aurelia-tools": "^0.1.12",
"babel-dts-generator": "^0.4.5",
"babel-eslint": "^4.1.1",
"babel-plugin-syntax-flow": "^6.5.0",
"aurelia-tools": "^0.2.1",
"babel-dts-generator": "^0.5.1",
"babel-eslint": "^6.0.4",
"babel-plugin-syntax-flow": "^6.8.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es2015-modules-amd": "^6.6.5",
"babel-plugin-transform-es2015-modules-commonjs": "^6.7.0",
"babel-plugin-transform-es2015-modules-systemjs": "^6.6.5",
"babel-plugin-transform-flow-strip-types": "^6.7.0",
"babel-preset-es2015": "^6.6.0",
"babel-plugin-transform-es2015-modules-amd": "^6.8.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.8.0",
"babel-plugin-transform-es2015-modules-systemjs": "^6.9.0",
"babel-plugin-transform-flow-strip-types": "^6.8.0",
"babel-preset-es2015": "^6.9.0",
"babel-preset-es2015-loose": "^7.0.0",
"babel-preset-es2015-loose-native-modules": "^1.0.0",
"babel-preset-stage-1": "^6.5.0",
"conventional-changelog": "0.0.11",
"del": "^1.1.0",
"gulp": "^3.8.10",
"conventional-changelog": "^1.1.0",
"del": "^2.2.0",
"eslint": "^2.12.0",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-bump": "^0.1.11",
"gulp-eslint": "^1.0.0",
"gulp-bump": "^2.1.0",
"gulp-concat": "^2.6.0",
"gulp-eslint": "^2.0.0",
"gulp-ignore": "^2.0.1",
"gulp-insert": "^0.5.0",
"gulp-rename": "^1.2.2",
"gulp-typedoc": "^1.2.1",
"gulp-typedoc": "^2.0.0",
"gulp-typedoc-extractor": "^0.0.8",
"jasmine-core": "^2.1.3",
"karma": "^0.13.15",
"gulp-typescript": "^2.13.6",
"gulp-util": "^3.0.7",
"jasmine-core": "^2.4.1",
"karma": "^0.13.22",
"karma-babel-preprocessor": "^6.0.1",
"karma-chrome-launcher": "^0.1.7",
"karma-coverage": "^0.3.1",
"karma-jasmine": "^0.3.5",
"karma-jspm": "^2.0.1",
"object.assign": "^1.0.3",
"require-dir": "^0.1.0",
"run-sequence": "^1.0.2",
"vinyl": "^0.5.1",
"vinyl-paths": "^1.0.0",
"yargs": "^2.1.1"
"karma-chrome-launcher": "^1.0.1",
"karma-coverage": "^1.0.0",
"karma-jasmine": "^1.0.2",
"karma-jspm": "^2.1.1",
"merge2": "^1.0.2",
"object.assign": "^4.0.3",
"require-dir": "^0.3.0",
"run-sequence": "^1.2.1",
"through2": "^2.0.1",
"typedoc": "^0.4.2",
"typescript": "^1.9.0-dev.20160611-1.0",
"vinyl": "^1.1.1",
"vinyl-paths": "^2.1.0",
"yargs": "^4.7.1"
},

@@ -72,0 +84,0 @@ "aurelia": {

@@ -6,2 +6,3 @@ # aurelia-logging

[![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)
[![CircleCI](https://circleci.com/gh/aurelia/logging.svg?style=shield)](https://circleci.com/gh/aurelia/logging)

@@ -8,0 +9,0 @@ 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.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc