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

Logging to apache log #912

Closed
tobybatch opened this issue Jul 4, 2019 · 10 comments
Closed

Logging to apache log #912

tobybatch opened this issue Jul 4, 2019 · 10 comments

Comments

@tobybatch
Copy link
Member

Is your feature request related to a problem? Please describe.
In the docker in particular we run Apache in the attached mode and Apache logs to stdout. Symfony logs are being written to the var/log folder. This will in time bloat the disk as there is no cron to rotate the logs and we need a docker exec command to read the logs.

Describe the solution you'd like
Redirect logs to the Apache stdout or stderr. I know this is really a symfony thing but I'm bgg**d if I can find out how.

Describe alternatives you've considered
Mounting /dev/null over the log files but then we loose logging altogether

Additional context
not really.

@kevinpapst
Copy link
Member

Here is the Monolog config:
https://github.com/kevinpapst/kimai2/blob/master/config/packages/prod/monolog.yaml

You should be able to overwrite it in local.yaml but I never tried.
Maybe you have to mount (or overwrite it directly with) a new version.

And here is some documentation:
https://symfony.com/doc/current/logging.html#how-to-rotate-your-log-files

I guess the default config should be improved ... maybe we can find together a better default and for you something that works smooth in docker?!

And I will start a new documentation after we have something working.

@tobybatch
Copy link
Member Author

Ok, I'll start looking at this when I next cycle into some kimai time. I was being a bit cheeky and just hoping you could say "easy do it like this..." :)

@kevinpapst
Copy link
Member

From my understanding ehe idea behind all these log frameworks is actually to prevent logging to generic webserver logs. They fetch all notices, exceptions and stuff and then sent them to configured writers.
Syslog is easy, but I am not sure if Apache logs are even possible.

@tobybatch
Copy link
Member Author

Ah, that may be my target then. I can probably get apache to log to syslog and attach that to the std out. Leave it with me.

@kevinpapst
Copy link
Member

Fixed?

@tobybatch
Copy link
Member Author

I just figured I's close it as we can't log to apache. If I can attache the syslog to the std out then I'll just add it in the docker. You have enough tickets...

@kevinpapst
Copy link
Member

LOL, thats true.
But I think docker is important for the project, as it helps to distribute Kimai, so I would always give it a high priority.
If you have a working solution, can you send me a link to the GitHub file where I can find it?
I might use it for documentation on the website.

@tobybatch
Copy link
Member Author

Thanks, I'll come back it, I'm looking a PR for per-populating tags from the query string on time sheet creation so I can use them to identify git hub issues. It's all part of a chrome extension.

@tobybatch
Copy link
Member Author

@lock
Copy link

lock bot commented Sep 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants