Skip to content

Commit

Permalink
[Prepare Release] Bumped version to 0.0.1-rc.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlautier committed May 17, 2016
1 parent ea88ce1 commit f3c89d9
Show file tree
Hide file tree
Showing 12 changed files with 153 additions and 1 deletion.
7 changes: 7 additions & 0 deletions dist/amd/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
define(["require", "exports", "./logging/logging"], function (require, exports, logging_1) {
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(logging_1);
});
26 changes: 26 additions & 0 deletions dist/amd/logging/logger.factory.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
define(["require", "exports", "@angular/core", "./logger.service"], function (require, exports, core_1, logger_service_1) {
"use strict";
var LoggerFactory = (function () {
function LoggerFactory(loggerService) {
this.loggerService = loggerService;
}
LoggerFactory.prototype.getInstance = function (sourceId) {
return new logger_service_1.Log(sourceId, this.loggerService);
};
LoggerFactory = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [logger_service_1.LoggerService])
], LoggerFactory);
return LoggerFactory;
}());
exports.LoggerFactory = LoggerFactory;
});
3 changes: 3 additions & 0 deletions dist/amd/logging/logger.model.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
define(["require", "exports"], function (require, exports) {
"use strict";
});
61 changes: 61 additions & 0 deletions dist/amd/logging/logger.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
define(["require", "exports", "@angular/core"], function (require, exports, core_1) {
"use strict";
var LoggerService = (function () {
function LoggerService() {
}
LoggerService.prototype.log = function (logType, message, data) {
if (data) {
console[logType](message, data);
}
else {
console[logType](message);
}
};
LoggerService = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [])
], LoggerService);
return LoggerService;
}());
exports.LoggerService = LoggerService;
var Log = (function () {
function Log(sourceId, logger) {
this.sourceId = sourceId;
this.logger = logger;
}
Log.prototype.debug = function (method, message, data) {
this.log("debug", method, message, data);
};
Log.prototype.info = function (method, message, data) {
this.log("info", method, message, data);
};
Log.prototype.warn = function (method, message, data) {
this.log("warn", method, message, data);
};
Log.prototype.error = function (method, message, data) {
this.log("error", method, message, data);
};
Log.prototype.log = function (type, method, message, data) {
this.logger.log(type, "" + this.buildLogMessage(method, message), data);
};
Log.prototype.buildLogMessage = function (method, message) {
if (message) {
return "[" + this.sourceId + "::" + method + "] " + message;
}
else {
return "[" + this.sourceId + "::" + method + "]";
}
};
return Log;
}());
exports.Log = Log;
});
12 changes: 12 additions & 0 deletions dist/amd/logging/logging.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
define(["require", "exports", "./logger.factory", "./logger.service", "./logger.service", "./logger.factory"], function (require, exports, logger_factory_1, logger_service_1, logger_service_2, logger_factory_2) {
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(logger_service_2);
__export(logger_factory_2);
exports.LOGGER_PROVIDERS = [
logger_factory_1.LoggerFactory,
logger_service_1.LoggerService
];
});
1 change: 1 addition & 0 deletions dist/typings/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./logging/logging";
7 changes: 7 additions & 0 deletions dist/typings/logging/logger.factory.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { ILog } from "./logger.model";
import { LoggerService } from "./logger.service";
export declare class LoggerFactory {
private loggerService;
constructor(loggerService: LoggerService);
getInstance(sourceId: string): ILog;
}
6 changes: 6 additions & 0 deletions dist/typings/logging/logger.model.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface ILog {
debug(method: string, message?: string, data?: any): void;
info(method: string, message?: string, data?: any): void;
warn(method: string, message?: string, data?: any): void;
error(method: string, message?: string, data?: any): void;
}
15 changes: 15 additions & 0 deletions dist/typings/logging/logger.service.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { ILog } from "./logger.model";
export declare class LoggerService {
log(logType: string, message: string, data?: any): void;
}
export declare class Log implements ILog {
private sourceId;
private logger;
constructor(sourceId: string, logger: LoggerService);
debug(method: string, message?: string, data?: any): void;
info(method: string, message?: string, data?: any): void;
warn(method: string, message?: string, data?: any): void;
error(method: string, message?: string, data?: any): void;
private log(type, method, message?, data?);
private buildLogMessage(method, message?);
}
4 changes: 4 additions & 0 deletions dist/typings/logging/logging.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from "./logger.service";
export * from "./logger.factory";
export * from "./logger.model";
export declare const LOGGER_PROVIDERS: any;
10 changes: 10 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<a name="0.0.1-rc.0"></a>
## 0.0.1-rc.0 (2016-05-17)


### Features

* **logger:** initial commit for logger ([1904d06](https://github.com/sketch7/ssv-ng2-core/commit/1904d06))



2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ssv-ng2-core",
"version": "0.0.0",
"version": "0.0.1-rc.0",
"description": "ssv core angular2 components, utilities and services",
"keywords": [
"sketch7",
Expand Down

0 comments on commit f3c89d9

Please sign in to comment.