-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warum sind die benchmarks eingecheckt. Sind diese bei der NPM Veröffentlichung.
src/interfaces.ts
Outdated
} | ||
|
||
export interface ILogFunction { | ||
(message: string, ...parameter: Array<any>): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sollte parameters
oder arguments
heißen (Plural)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ich werde es wie überall sonst auch logObjects
nennen
src/interfaces.ts
Outdated
} | ||
|
||
export interface ILoggerhythmHook { | ||
(logLevel: LogLevel, namespace: string, message: string, ...parameter: Array<any>): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sollte parameters
oder arguments
heißen (Plural)
src/loggerhythm.ts
Outdated
} else { | ||
(<any> winston).level = LogLevel.DEBUG; | ||
} | ||
const stdoutIsAvaliable: boolean = process !== undefined && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
betrifft eigentlich auch den stderr stream - name irreführend :P
src/loggerhythm.ts
Outdated
} | ||
|
||
public warn(message: string, ...logParameter: Array<any>): void { | ||
this._log(LogLevel.WARN, message, ...logParameter); | ||
public createLogger(namespace?: string): Logger { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bin etwas verwirrt, wozu diese Methode dient - wäre es nicht sinnvoll eine statische Variante zum Erzeugen neuer Logger zu haben und eine instanzgebundene Variante, die einen Child-Logger erstellt, der sich an den Namespace seines Parent anhängt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guter Einfall! werde die isntanz-Methode umbenennen, zu createChildLogger, so dass der namespace concatiniert wird
@moellenbeck die benchmarks sind nicht in den |
Please read this for context
This includes the small changes of #3
This removes winston, as it is not needeed anymore. instead, everything gets logged, no matter the loglevel. The loglevel is just for the prefix in the log, and the prefixes color.
This removes the loglevels
critical
,debug
andsilly
. It also adds some benchmarks for anyone who wants to benchmark the aspects of loggerhythm. On my machine, i get up to 180k logs/sec for simple logs, and up to 17k logs/sec when logging circular and complex objects.Please discuss if colored loglevels and colored object-logs should be enabled or disabled by default, and if they should be configurable. currently,colors are enabled by default and not configurableregarding log-colors, see #5