fix tracker: fix logger ref
This commit is contained in:
parent
0150821878
commit
80c9dd2bb9
3 changed files with 10 additions and 6 deletions
|
|
@ -1,4 +1,8 @@
|
|||
# 14.0.0
|
||||
# 14.0.2
|
||||
|
||||
- fix logger check
|
||||
|
||||
# 14.0.0 & .1
|
||||
|
||||
- titles for tabs
|
||||
- new `MouseClick` message to introduce heatmaps instead of clickmaps
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@openreplay/tracker",
|
||||
"description": "The OpenReplay tracker main package",
|
||||
"version": "14.0.1",
|
||||
"version": "14.0.2",
|
||||
"keywords": [
|
||||
"logging",
|
||||
"replay"
|
||||
|
|
|
|||
|
|
@ -15,25 +15,25 @@ export default class Logger {
|
|||
this.level = debugLevel
|
||||
}
|
||||
|
||||
private shouldLog(level: ILogLevel): boolean {
|
||||
private readonly shouldLog = (level: ILogLevel): boolean => {
|
||||
return this.level >= level
|
||||
}
|
||||
|
||||
log(...args: any[]) {
|
||||
log = (...args: any[]) => {
|
||||
if (this.shouldLog(LogLevel.Log)) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
console.log(...args)
|
||||
}
|
||||
}
|
||||
|
||||
warn(...args: any[]) {
|
||||
warn = (...args: any[]) => {
|
||||
if (this.shouldLog(LogLevel.Warnings)) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
console.warn(...args)
|
||||
}
|
||||
}
|
||||
|
||||
error(...args: any[]) {
|
||||
error = (...args: any[]) => {
|
||||
if (this.shouldLog(LogLevel.Errors)) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
console.error(...args)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue