简体   繁体   中英

How do I output log messages to the console

I am working on a sails.js web app so I am starting the web app using the command line. I am trying to output objects to the browser console but instead, they are displayed in the command line. Is there a way to change it so that logs are output to the console?

You can't output anything to the log in the browser directly from the server side code.

To do that you would put Javascript code in the response page, that would be executed in the browser and write to the log.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM