如何在Heroku Local上查看未修剪的日志 [英] How to see untrimmed logs on Heroku Local

查看:85
本文介绍了如何在Heroku Local上查看未修剪的日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在heroku本地上运行NodeJS应用程序,但是我所有的console.log语句和错误消息都被修整了.

I'm running a NodeJS app on heroku local, however all my console.log statements and error messages get trimmed.

例如:

forego | starting web.1 on port 5000
web.1  | module.js:339

我没有看到完整的错误日志.如何避免错误消息的修整?

I don't see the full error logs. How to avoid this trimming of error messages?

推荐答案

heroku local将运行您在Procfile中告诉它的所有过程.如果您想流式传输开发日志,只需在Procfile中添加log: tail -f log/development.log之类的内容即可.您还需要确保为此创建第二个Procfile(我使用Procfile.dev).将日志文件路径替换为所需的日志文件所在的位置.

heroku local will run whatever processes you tell it to in the Procfile. If you'd like to stream your development log, simply add something like log: tail -f log/development.log to your Procfile. You'll also want to make sure that you create a second Procfile (I use Procfile.dev) for this. Replace the log file path with wherever your desired log file is located.

干杯!

这篇关于如何在Heroku Local上查看未修剪的日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆