@@ -539,7 +539,7 @@ Log.handleExitEvents('process-exit')
539539
540540## Emit Log events with ProcLog
541541
542- Decouple logging via process event 'log'. This allows to use a different
542+ Decouple logging via process event 'log-level '. This allows to use a different
543543logger framework than 'debug-level'. In such cases you'd need to adapt your
544544framework of choice for logging. Check ` initProcLog() ` for inspiration.
545545
@@ -565,11 +565,13 @@ import { ProcLog, initProcLog } from 'debug-level'
565565// If using a different logger you'd need to provide a custom initializer which
566566// connects to the framework of choice.
567567initProcLog ({ serializers: {... }, Log: LogEcs })
568+ // or default
569+ initProcLog ()
568570
569571// Add a logger with a namespace.
570572// Use options only for defining the log-level (or leave undefined to control
571573// via env-vars)
572- const log = new ProcLog (' app :namespace' )
574+ const log = new ProcLog (' my-webapp :namespace' )
573575// add some logging
574576log .info (' show some logging' )
575577```
@@ -640,9 +642,9 @@ In your single page application use:
640642import { Log } from ' debug-level'
641643
642644localStorage .setItem (' DEBUG_URL' , ' /debug-level' )
643- localStorage .setItem (' DEBUG' , ' myApp *' )
645+ localStorage .setItem (' DEBUG' , ' my-app *' )
644646// ...
645- const log = new Log (' myApp ' )
647+ const log = new Log (' my-app ' )
646648
647649log .debug (' my first %s' , ' logline' )
648650```
0 commit comments