Skip to content

Commit 405aad6

Browse files
author
craigparra
committed
1.1.9 / 2021-08-10
================== * LoggerFactory now context aware - @craigparra
1 parent 459b3f2 commit 405aad6

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

History.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
1.1.9 / 2021-08-10
2+
==================
3+
4+
* LoggerFactory now context aware - @craigparra
5+
16
1.1.8 / 2021-08-07
27
==================
38

49
* Change repos to org - @craigparra
5-
10+
611
1.1.7 / 2021-07-30
712
==================
813

LoggerFactory.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ module.exports = class LoggerFactory {
111111
}
112112
}
113113

114-
getLogger(category) {
114+
getLogger(categoryArg) {
115+
const category = (typeof categoryArg === 'string') ? categoryArg :
116+
(categoryArg && categoryArg.qualifier)
117+
|| (categoryArg && categoryArg.name)
118+
|| (categoryArg && categoryArg.constructor && categoryArg.constructor.name);
115119
return new ConfigurableLogger(this.config,
116120
new ConsoleLogger(category,
117121
null, null, null,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alt-javascript/logger",
3-
"version": "1.1.8",
3+
"version": "1.1.9",
44
"description": "A simple configurable logging facade for javascript.",
55
"author": "",
66
"keywords": [

0 commit comments

Comments
 (0)