![]() Likewise, to see logs only from the application implementation set the value of DEBUG to express:application, and so on. To see the logs only from the router implementation set the value of DEBUG to express:router. When a request is then made to the app, you will see the logs specified in the Express code: express:router dispatching GET / +4hÄ®xpress:view stat "/projects/example/views/index.pug" +0msÄ®xpress:view render "/projects/example/views/index.pug" +1ms bin/wwwÄ®xpress:application compile etag weak +1msÄ®xpress:application compile query parser extended +0msÄ®xpress:application compile trust proxy false +0msÄ®xpress:application booting in development mode +1msÄ®xpress:router use / urlencodedParser +0msÄ®xpress:router use / +0msRunning this command on the default app generated by the express generator prints the following output: $ DEBUG=express:* node. On Windows, use the corresponding command. To see all the internal logs used in Express, set the DEBUG environment variable toÄ®xpress:* when launching your app. Logging is turned off by default and can be conditionally turned on by using the DEBUG environment variable. Debug is like an augmented version of console.log, but unlike console.log, you donât have toĬomment out debug logs in production code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |