File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " nflx-spectator" ,
3- "version" : " 3.0.12 " ,
3+ "version" : " 3.0.13 " ,
44 "license" : " Apache-2.0" ,
55 "homepage" : " https://github.com/Netflix/spectator-js" ,
66 "author" : " Netflix Telemetry Engineering <netflix-atlas@googlegroups.com>" ,
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ const levels: Record<string, number> = {
77 fatal : 60
88} ;
99
10- export type Logger < T extends string | never = string > = {
10+ export type Logger = {
1111 trace : ( message : string ) => void ;
1212 debug : ( message : string ) => void ;
1313 info : ( message : string ) => void ;
1414 warn : ( message : string ) => void ;
1515 error : ( message : string ) => void ;
1616 fatal : ( message : string ) => void ;
17- [ key : string ] : ( message : T ) => void ;
17+ [ key : string ] : ( message : string ) => void ;
1818} ;
1919
2020export function get_logger ( level_name ?: string ) : Logger {
Original file line number Diff line number Diff line change 11import { assert } from "chai" ;
22import { get_logger , Logger } from "../../src/index.js" ;
33import { describe , it } from "node:test" ;
4- import { pino } from 'pino' ;
4+ import { pino } from 'pino' ;
55import { once , sink } from 'pino-test' ;
66
77describe ( "Logger Tests" , ( ) : void => {
88
99 it ( "integrate with pino" , async ( ) : Promise < void > => {
1010 const stream = sink ( ) ;
11- const log : Logger = pino ( { level : 'trace' } , stream ) ;
11+ const log : Logger = pino ( { level : 'trace' } , stream ) as Logger ;
1212
1313 log . trace ( "trace" ) ;
1414 await once ( stream , { level : 10 , msg : 'trace' } ) ;
You can’t perform that action at this time.
0 commit comments