flaschenpost
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -15,2 +15,2 @@ import Configuration from './Configuration'; | ||
export default _default; | ||
export { Configuration, Flaschenpost, formatters, MorganPlugin }; | ||
export { Configuration, Flaschenpost, formatters, Logger, MorganPlugin }; |
@@ -16,2 +16,3 @@ "use strict"; | ||
const Logger_1 = __importDefault(require("./Logger")); | ||
exports.Logger = Logger_1.default; | ||
const MorganPlugin_1 = __importDefault(require("./MorganPlugin")); | ||
@@ -18,0 +19,0 @@ exports.MorganPlugin = MorganPlugin_1.default; |
@@ -13,6 +13,4 @@ "use strict"; | ||
origin = `${logEntry.hostname}`; | ||
if (logEntry.application) { | ||
origin += `::${logEntry.application.name}@${logEntry.application.version}`; | ||
} | ||
if (!logEntry.application || logEntry.application.name !== logEntry.module.name) { | ||
origin += `::${logEntry.application.name}@${logEntry.application.version}`; | ||
if (logEntry.application.name !== logEntry.module.name) { | ||
origin += `::${logEntry.module.name}@${logEntry.module.version}`; | ||
@@ -19,0 +17,0 @@ } |
@@ -5,2 +5,3 @@ "use strict"; | ||
const getLogEntryIdGenerator = function* () { | ||
/* eslint-disable @typescript-eslint/no-unnecessary-condition */ | ||
while (true) { | ||
@@ -10,3 +11,4 @@ yield nextId; | ||
} | ||
/* eslint-enable @typescript-eslint/no-unnecessary-condition */ | ||
}; | ||
exports.default = getLogEntryIdGenerator; |
@@ -44,6 +44,3 @@ "use strict"; | ||
} | ||
if (this.configuration.highestEnabledLogLevel === 'fatal') { | ||
return ['fatal'].includes(logLevel); | ||
} | ||
throw new Error('Invalid operation.'); | ||
return ['fatal'].includes(logLevel); | ||
} | ||
@@ -50,0 +47,0 @@ isDebugLoggingEnabled() { |
@@ -8,7 +8,7 @@ "use strict"; | ||
const isError_1 = __importDefault(require("lodash/isError")); | ||
const serialize_error_1 = __importDefault(require("serialize-error")); | ||
const serialize_error_1 = require("serialize-error"); | ||
const sanitizeMetadata = function (metadata) { | ||
const cloner = function (value) { | ||
if (isError_1.default(value)) { | ||
return serialize_error_1.default(value); | ||
return serialize_error_1.serializeError(value); | ||
} | ||
@@ -15,0 +15,0 @@ return undefined; |
@@ -103,2 +103,2 @@ import { cloneDeep } from 'lodash'; | ||
export default new Flaschenpost(); | ||
export { Configuration, Flaschenpost, formatters, MorganPlugin }; | ||
export { Configuration, Flaschenpost, formatters, Logger, MorganPlugin }; |
@@ -14,7 +14,6 @@ import chalk from 'chalk'; | ||
origin = `${logEntry.hostname}`; | ||
if (logEntry.application) { | ||
origin += `::${logEntry.application.name}@${logEntry.application.version}`; | ||
} | ||
if (!logEntry.application || logEntry.application.name !== logEntry.module.name) { | ||
origin += `::${logEntry.application.name}@${logEntry.application.version}`; | ||
if (logEntry.application.name !== logEntry.module.name) { | ||
origin += `::${logEntry.module.name}@${logEntry.module.version}`; | ||
@@ -21,0 +20,0 @@ } |
@@ -5,2 +5,3 @@ import { LogEntryIdGenerator } from './LogEntryIdGenerator'; | ||
const getLogEntryIdGenerator = function * (): LogEntryIdGenerator { | ||
/* eslint-disable @typescript-eslint/no-unnecessary-condition */ | ||
while (true) { | ||
@@ -11,4 +12,5 @@ yield nextId; | ||
} | ||
/* eslint-enable @typescript-eslint/no-unnecessary-condition */ | ||
}; | ||
export default getLogEntryIdGenerator; |
@@ -56,7 +56,4 @@ import Configuration from './Configuration'; | ||
} | ||
if (this.configuration.highestEnabledLogLevel === 'fatal') { | ||
return [ 'fatal' ].includes(logLevel); | ||
} | ||
throw new Error('Invalid operation.'); | ||
return [ 'fatal' ].includes(logLevel); | ||
} | ||
@@ -63,0 +60,0 @@ |
import cloneDeepWith from 'lodash/cloneDeepWith'; | ||
import isError from 'lodash/isError'; | ||
import serializeError from 'serialize-error'; | ||
import { serializeError } from 'serialize-error'; | ||
@@ -5,0 +5,0 @@ const sanitizeMetadata = function (metadata: object): object { |
{ | ||
"name": "flaschenpost", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "flaschenpost is a logger for cloud-based applications.", | ||
@@ -44,7 +44,7 @@ "contributors": [ | ||
"chalk": "2.4.2", | ||
"date-fns": "2.1.0", | ||
"date-fns": "2.6.0", | ||
"find-root": "1.1.0", | ||
"lodash": "4.17.15", | ||
"processenv": "2.0.1", | ||
"serialize-error": "4.1.0", | ||
"serialize-error": "5.0.0", | ||
"stack-trace": "0.0.10", | ||
@@ -55,9 +55,7 @@ "stringify-object": "3.3.0" | ||
"@types/app-root-path": "1.2.4", | ||
"@types/chalk": "2.2.0", | ||
"@types/common-tags": "1.8.0", | ||
"@types/express": "4.17.1", | ||
"@types/find-root": "1.1.1", | ||
"@types/lodash": "4.14.138", | ||
"@types/node": "12.7.4", | ||
"@types/serialize-error": "4.0.1", | ||
"@types/lodash": "4.14.144", | ||
"@types/node": "12.11.5", | ||
"@types/stack-trace": "0.0.29", | ||
@@ -69,3 +67,3 @@ "@types/stringify-object": "3.2.0", | ||
"record-stdstreams": "2.1.0", | ||
"roboter": "7.2.0", | ||
"roboter": "9.0.5", | ||
"strip-ansi": "5.2.0" | ||
@@ -72,0 +70,0 @@ }, |
14
47079
885
+ Addeddate-fns@2.6.0(transitive)
+ Addedserialize-error@5.0.0(transitive)
+ Addedtype-fest@0.8.1(transitive)
- Removeddate-fns@2.1.0(transitive)
- Removedserialize-error@4.1.0(transitive)
- Removedtype-fest@0.3.1(transitive)
Updateddate-fns@2.6.0
Updatedserialize-error@5.0.0