Open mhellmeier opened 2 years ago
Hey! Sounds good, but currently I don't have much time to look at this.
Issues from PHP are logged already via https://github.com/andi34/photobooth/blob/dev/lib/log.php
The log is accessible via the Debugpanel, the logs get read here: https://github.com/andi34/photobooth/blob/dev/api/serverInfo.php
Currently there's more or less 3 log level:
The dev mode got independent from the example images https://github.com/andi34/photobooth/commit/eaa6e9df2061df073eb9eb76d5e9fecb1ff8c2ce
Do you have time to look at the js logging parts and can open a PR?
Yeah, a JS version from the PHP logging would be great.
Currently, I am also not able to implement it. If I get some time in the near future and if the feature isn't solved until then, I can implement it.
Is your feature request related to a problem?
Yes
Description
Sometimes, the application doesn't work anymore and only shows the default error message. In a live scenario, it is really hard to debug the problem, because error messages are only printed on the JavaScript console.
Describe the solution you'd like
It would be great to add a file-based logging system because it enables post-failure analysis. Like a file called
photobooth.log
in the root directory containing information about the past. This can be easily integrated into thephotoboothTools
: https://github.com/andi34/photobooth/blob/dev/src/js/tools.js#L6Describe alternatives you've considered
-
Additional context
A simple
writeFile
based function is totally enough. But there are also some 3rd party dependencies that might be interesting like winston. Further, it has to be considered that the file must be protected against external access because it contains sensitive data.Additional nice-to-have logging features are: