Skip to content

Commit

Permalink
feat: add logger.meta
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Jun 17, 2024
1 parent 074d116 commit b32dfdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ declare namespace Logger {

export interface Record {
id: number
meta: any
meta: Logger.Meta
name: string
type: Logger.Type
level: number
content: string
timestamp: number
}

export interface Meta {}

export interface Target {
/**
* - 0: no color support
Expand Down
2 changes: 1 addition & 1 deletion src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class Logger {
}

extend = (namespace: string) => {
return new Logger(`${this.name}:${namespace}`)
return new Logger(`${this.name}:${namespace}`, this.meta)
}

warning = (format: any, ...args: any[]) => {
Expand Down

0 comments on commit b32dfdd

Please sign in to comment.