问题描述
当我使用以下命令从本地计算机上的 VScode 终端运行节点服务器时,我可以在 VScode 终端中看到发送到服务器的每个请求时生成的 console.log 输出。
node app.js
但是,当我从 EC2 实例命令行运行同一台服务器时,我看不到这样的 console.log 输出。我也尝试了以下但console.log 输出没有记录在stdout.txt 或stderr.txt
node app.js > stdout.txt 2> stderr.txt &
如何在文件中查看或存储这样的 console.log 输出?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)