Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom logs not watched on local/dev #37

Open
lyondhill opened this issue Dec 15, 2016 · 5 comments
Open

Custom logs not watched on local/dev #37

lyondhill opened this issue Dec 15, 2016 · 5 comments

Comments

@lyondhill
Copy link

From @mbrodala on December 15, 2016 9:40

Here's an excerpt from my boxfile.yml:

# ...
web.site:
  # ...

  log_watch:
    apache[access]: /data/var/log/apache/access.log
    apache[error]: /data/var/log/apache/error.log
    php[error]: /data/var/log/php/php_error.log
    php[fpm]: /data/var/log/php/php_fpm.log
    typo3[typo3]: var/log/typo3.log
    # ...

However, only the apache and php logs are watched and outputted on nanbox run php-server, the typo3 log is ignored. Is there anything I missed?

Copied from original issue: nanobox-io/nanobox#299

@lyondhill
Copy link
Author

From @mbrodala on December 15, 2016 9:42

I can see the following after nanobox run:

/app $ ps aux | grep tail
gonano     136  0.0  0.0   6044   716 ?        S+   09:36   0:00 tail -f -n0 /data/var/log/php/php_error.log /data/var/log/php/php_fpm.log /data/var/log/apache/access.log /data/var/log/apache/error.log

So it looks like my custom log was indeed ignored.

@lyondhill
Copy link
Author

From @danhunsaker on December 15, 2016 11:27

This is actually because the web instance isn't being created in the first place - dev mode doesn't spin up separate containers for webs and workers, instead spinning up one container for each app's console. So any settings in the web.* or worker.* sections aren't applied in development mode; they'll only kick in when deployed to dry-run or production.

@lyondhill
Copy link
Author

From @mbrodala on December 15, 2016 11:37

I guess this makes sense; even php-server is invoked manually and no network_dirs are set up (not neccessary).

But still I can see log output on nanobox run php-server; would it be possible to include custom logs here? Just as minor feature request. Of course I can open/tail the app logs on my host system if not. ;-)

@lyondhill
Copy link
Author

From @danhunsaker on December 15, 2016 11:48

I'd enjoy that as well. I'll have a peek at the engine repo and see if I can tweak the script any. The big trouble will be parsing the Boxfile - that isn't generally done outside the build/compile phases.

@lyondhill
Copy link
Author

From @danhunsaker on December 15, 2016 11:57

Ah. Well. php-server is generated from a template. While the Boxfile is accessible. That shouldn't be too tricky to work with to give this additional functionality, though I'll probably have to look at it tomorrow or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant