@@ -10,25 +10,26 @@ tracer.init({
1010let logger = new BuffLog ( ) ;
1111
1212logger . info ( 'hello info' ) ;
13- logger . debug ( 'hello debug' ) ;
1413logger . notice ( 'hello notice' ) ;
14+ logger . notice ( 'hello notice with context' , { "test" :"toto" } ) ;
1515logger . warning ( 'hello warning' ) ;
1616logger . error ( 'hello error' ) ;
1717logger . critical ( 'hello critical' ) ;
18+ logger . critical ( 'hello critical' , { "some" :"stuff" } ) ;
1819
1920const app = express ( ) ;
2021
21- app . listen ( 4000 , ( ) => {
22- console . log ( `Server is listening on port 4000` ) ;
23- } ) ;
22+ // app.listen(4000, () => {
23+ // console.log(`Server is listening on port 4000`);
24+ // });
2425
25- app . get ( '/' , ( req , res ) => {
26- var logger = new BuffLog ( ) ;
27- logger . notice ( "Notice log via endpoint" ) ;
28- logger . info ( 'hello info' ) ;
29- logger . debug ( 'hello debug' ) ;
30- logger . notice ( 'hello notice' ) ;
31- logger . warning ( 'hello warning' ) ;
32- logger . error ( 'hello error' ) ;
33- logger . critical ( 'hello critical' ) ;
34- } ) ;
26+ // app.get('/', (req, res) => {
27+ // var logger = new BuffLog();
28+ // logger.notice("Notice log via endpoint");
29+ // logger.info('hello info');
30+ // logger.debug('hello debug');
31+ // logger.notice('hello notice');
32+ // logger.warning('hello warning');
33+ // logger.error('hello error');
34+ // logger.critical('hello critical');
35+ // });
0 commit comments