-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Prepare Release] Bumped version to 0.0.1-rc.0.
- Loading branch information
1 parent
ea88ce1
commit f3c89d9
Showing
12 changed files
with
153 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
define(["require", "exports"], function (require, exports) { | ||
"use strict"; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
]; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./logging/logging"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters