LoginSignup
4
2

More than 5 years have passed since last update.

foreverした後console.logの出力先は何処へ...?

Posted at

はじめに

サーバー等で自分が作成した環境をずっと起動させておきたい場合、node jsファイル
とするのではなく、npmでforeverモジュールをインストールして、forever start jsファイルなどとすれば、永遠にそのjsファイルを起動できます。
ただ、そこで思ったのが
console.logの出力が消えた!!
ということです。node jsファイルとするときは常時その端末(ターミナルとか)に出力されますよね。ただ、foeverでは端末に現れないのです。それを疑問に思ったので、今回はこのことについて書きます。

環境

ローカル: Ubuntu14.04 LTS
レンタルサーバー: さくらVPS OS➞Ubuntu16.04 LTS

結論

forever listで出力ログが書いてありましたw
思ったより簡単に見つかりましたね。

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2