Closed jessebot closed 10 months ago
One question, is it possible to log to stdout (in apache and nginx) otherwise i must setup a complex tailer or sidecar.
maybe we should create options for easy deploy an sidecar with tail -F
maybe we should create options for easy deploy an sidecar with tail -F
I don't think we should do the sidecar running tail. That seems a little hacky. Users can still do that though via extra sidecar containers if they'd like via the following parameters:
One question, is it possible to log to stdout (in apache and nginx)
This part of the docs lists different logging types: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html#log-type
If none of that works, this may be more of a question for the nextcloud/server repo as we should be fixing the issue there instead of in the helm chart, which is two layers up. The stack here is nextcloud/server > nextcloud/docker > nextcloud/helm, so it may also be worth taking a look through the nextcloud/docker issues/discussions as well to see if it's been addressed there.
otherwise i must setup a complex tailer or sidecar.
@wrenix do let me know the results of your sleuthing though! :)
i use loki and i prefer the logging operator over promtail.
so we could add logging-operator flow
inside of the helmchart with the rules of parsing: https://kube-logging.dev/docs/configuration/flow/.
my suggestion is, to but the sidecar inside the deployment, like nginx and make an option for enabled it in the values.yaml
Could you please ask in the nextcloud/server repo if logging to stdout/stderr is something that is possible or submit a PR to accommodate it there? That would avoid adding this to the helm chart, and in the meantime, you can also still use the suggested nextcloud.extraSidecarContainers
which does the tail -f
you suggested in the example. If it's not doable in nextcloud/server and there's no features baked into the docker container, then I guess we could do the logging sidecar container. It just feels so hacky, but if it's a common use case anyway, and it can't be added upstream, you can still submit the PR and we'll review it :pray:
It is not possible to directly log to stdout or stderr sadly.
Welp, then I guess we should add logging section :sweat_smile: @wrenix feel free to submit that!
How has this not come up in the docker repo already though?
In docker-compose i do this, which is hackish, but works:
command: sh -c 'tail -f /var/www/html/data/nextcloud.log | tee -a /proc/1/fd/2 & apachectl -D FOREGROUND'
Description of the change
Would like to have a logging section that details how to set debug logging like:
And mention the logging levels as well:
should also make sure we note this URL for more info: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html
Benefits
Then we can point to that section in the README in our issue template as well as in any other issues when users would like to know how to get more detailed logs. Saves typing :)
Possible drawbacks
none that I can see
Additional information
will try to submit a pr to add that section and also update the issue template when I can, but would also be happy to review someone else's PR if they can get to it.