Add rotating log info by @minrk to docs

This commit is contained in:
Carol Willing
2017-03-24 10:56:35 -07:00
parent 1970273c58
commit 942e05888b

View File

@@ -18,6 +18,7 @@ problem and how to resolve it.
- How do I increase the number of pySpark executors on YARN?
- How do I use JupyterLab's prerelease version with JupyterHub?
- How do I set up JupyterHub for a workshop (when users are not known ahead of time)?
- How do I set up rotating daily logs?
[*Troubleshooting commands*](#troubleshooting-commands)
@@ -226,6 +227,31 @@ notebook servers to default to JupyterLab:
Users will need a GitHub account to login and be authenticated by the Hub.
### How do I set up rotating daily logs?
You can do this with [logrotate](http://www.linuxcommand.org/man_pages/logrotate8.html),
or pipe to `logger` to use syslog instead of directly to a file.
For example, with this logrotate config file:
```
/var/log/jupyterhub.log {
copytruncate
daily
}
```
and run this daily by putting a script in `/etc/cron.daily/`:
```bash
logrotate /path/to/above-config
```
Or use syslog:
jupyterhub | logger -t jupyterhub
## Troubleshooting commands
The following commands provide additional detail about installed packages,
@@ -271,4 +297,3 @@ In order to resolve this issue, there are two potential options.
script (e.g. /etc/hadoop/conf/custom_topology_script.py). Copy the original script and change the first line point
to a python two installation (e.g. /usr/bin/python).
2. In spark-env.sh add a Python 2 installation to your path (e.g. export PATH=/opt/anaconda2/bin:$PATH).