multi_logger icon indicating copy to clipboard operation
multi_logger copied to clipboard

Problem with Heroku Push

Open ZavenArra opened this issue 10 years ago • 7 comments

When I push to Heroku, I get the error Errno::ENOENT: No such file or directory - /tmp/build_1a3e7f9e-d26a-4049-83e3-565c75bab789/log/stack.log

This is my (currently one and only) multilogger log. Ideas as to why this might be ? I've seen mention of other gems having similar errors with heroku push, so it's gotta be this gem.

ZavenArra avatar Jul 19 '14 21:07 ZavenArra

Didn't an error the first time I pushed, did the second time. Taking the multi logger line out of my initializer got me past the problem. If you can give me a few hints I'd be happy to patch this one.

ZavenArra avatar Jul 19 '14 21:07 ZavenArra

Hi there. I have never used Heroku, so I can only assume this is because Heroku tries to prevent apps from creating files (because it want to be a static system). In heroku, how do you view your log files? Do you SSH in to the machine and then CD into the log directory and view the log file?

lulalala avatar Jul 20 '14 01:07 lulalala

You view the log files using the heroku client, as you don't have direct access to the filesystem. A similar problem in another gem recommended adding the file in question to version control (one deploys to heroku using git) but this also did not fix the issue..

ZavenArra avatar Jul 20 '14 02:07 ZavenArra

So I see that you type heroku logs to access logs. What command do you expect to use access custom logs?

lulalala avatar Jul 21 '14 10:07 lulalala

honestly haven't gotten that far with it yet, was going to loo at redirecting multi logger to stdout for heroku. the main thing was just being able to push to heroku without disabling the log i had set up, but you may be on the right rack - how could i simply redirect multi logger to stdout for a certain environment ?

ZavenArra avatar Jul 22 '14 01:07 ZavenArra

I guess you can wait for #7 pull request. It will add a way to change logging file path. Then I can add one extra conditional check on top of that, so passing :stdout symbol would actually mean redirecting t to STDOUT

lulalala avatar Jul 23 '14 03:07 lulalala

Thanks. I think that what would make the most sense would to be log to STDOUT and also be able to prepend the logfile name to the log output for heroku. I have started looking into how this would be accomplished, not too familiar with the ActiveSupport codebase though.

ZavenArra avatar Jul 23 '14 04:07 ZavenArra