@aircall/logger
Advanced tools
Comparing version 0.0.9 to 0.0.10
{ | ||
"name": "@aircall/logger", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"main": "dist/index.js", | ||
@@ -16,3 +16,3 @@ "types": "dist/index.d.ts", | ||
}, | ||
"gitHead": "e2c6ecece0175e2de394ee619817ab9610b60ef5" | ||
"gitHead": "e49cf7abe14199a9c110c90220c682d736738f0e" | ||
} |
@@ -9,3 +9,3 @@ export enum LOGGER { | ||
interface log { | ||
export interface LoggerLog { | ||
message: string; | ||
@@ -19,3 +19,3 @@ properties: any; | ||
export const info = (message: string, properties?: any): log & { type: LOGGER.INFO } => ({ | ||
export const info = (message: string, properties?: any): LoggerLog & { type: LOGGER.INFO } => ({ | ||
type: LOGGER.INFO, | ||
@@ -26,3 +26,3 @@ message, | ||
export const warn = (message: string, properties?: any): log & { type: LOGGER.WARN } => ({ | ||
export const warn = (message: string, properties?: any): LoggerLog & { type: LOGGER.WARN } => ({ | ||
type: LOGGER.WARN, | ||
@@ -33,3 +33,3 @@ message, | ||
export const error = (message: string, properties?: any): log & { type: LOGGER.ERROR } => ({ | ||
export const error = (message: string, properties?: any): LoggerLog & { type: LOGGER.ERROR } => ({ | ||
type: LOGGER.ERROR, | ||
@@ -40,3 +40,3 @@ message, | ||
export const track = (message: string, properties?: any): log & { type: LOGGER.TRACK } => ({ | ||
export const track = (message: string, properties?: any): LoggerLog & { type: LOGGER.TRACK } => ({ | ||
type: LOGGER.TRACK, | ||
@@ -43,0 +43,0 @@ message, |
@@ -1,3 +0,1 @@ | ||
import { LoggerIdentificationOptions, LoggerInitOptions, LoggerLevel } from '@aircall/types'; | ||
interface WindowWithAnalytics extends Window { | ||
@@ -7,2 +5,18 @@ analytics: any; | ||
export type LoggerLevel = 'INFO' | 'WARN' | 'ERROR'; | ||
export type LoggerIdentificationOptions = { | ||
user_id: string; | ||
app_version: string; | ||
company: number; | ||
platform: string; | ||
environment: string; | ||
}; | ||
export type LoggerInitOptions = { | ||
debugMode: boolean; | ||
key: string; | ||
}; | ||
export default class Logger { | ||
@@ -9,0 +23,0 @@ |
307
14061
18