aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Log/File.php
Commit message (Collapse)AuthorAgeFilesLines
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix warning in PHP 8 about optional parameter before mandatory oneMorris Jobke2021-01-071-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix chmod on file descriptorJ0WI2020-07-031-1/+1
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-1/+1
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-091-0/+1
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-6/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+1
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move log detail aggregation to separate class and reuse it in syslog/systemd ↵Julius Härtl2019-07-171-58/+3
| | | | | | logger Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Make logfile's mode configurable.Roland Tapken2018-10-021-2/+5
| | | | | | | | | | | | | | | The file logger currently resets the mode of the logfile to 0640. When the webserver is running as a different user than the cron job (but both are in the same group) the files mode has to be 0660. The current implementation breaks logging for the user that is not the owner of the logfile. This patch introduces a new config option 'logfilemode' that expects an octal value (defaults to 0640). Unless the value is lower or equal than 0 the logfiles mode will be resetted to this value. Signed-off-by: Roland Tapken <roland@bitarbeiter.net>
* Make sure error_log() always receives a stringJoas Schilling2018-07-231-0/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* use SystemConfig, less dependencies, and not publicly neededArthur Schiwon2018-04-261-9/+8
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* add missing php doc and type hintsArthur Schiwon2018-04-261-2/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* move IFileBased to public namespace, logreader needs itArthur Schiwon2018-04-261-0/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* offer API to create own File log. admin_audit makes use of itArthur Schiwon2018-04-261-10/+13
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* destaticfy Log classesArthur Schiwon2018-04-261-30/+22
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* move log constants to ILoggerArthur Schiwon2018-04-261-1/+3
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Log exceptions as nested array instead of encoded jsonRobin Appelman2018-04-101-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Remove unneeded semicolon and parenthesesMorris Jobke2018-01-261-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Request->getHeader() should always return a stringMorris Jobke2018-01-171-1/+4
| | | | | | | | PHPDoc (of the public API) says that this method returns string but it also returns null, which is not allowed in some method calls. This fixes that behaviour and returns an empty string and fixes all code paths that explicitly checked for null to be still compliant. Found while enabling the strict_typing for lib/private for the PHP7+ migration. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Change @georgehrke's emailMorris Jobke2017-11-061-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headersMorris Jobke2017-11-061-1/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Ensure log message is UTF-8 encodedLukas Reschke2017-08-171-1/+12
| | | | | | | | | | | PHP's json_encode only accept proper UTF-8 strings, loop over all elements to ensure that they are properly UTF-8 compliant or convert them manually. Without this somebody passing an invalid User Agent may make json_encode return false which will get logged as empty newline. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Use constantsJoas Schilling2017-04-131-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Reorder the entries of the log for easier readingJuan Pablo Villafáñez2017-04-121-5/+5
|
* Merge pull request #3310 from duritong/patch-1Morris Jobke2017-04-041-1/+3
|\ | | | | only chmod logfile if necessary
| * only chmod logfile if necessaryduritong2017-01-291-1/+3
| | | | | | otherwise e.g. on SELinux this will log an error, so we better avoid it if not necessary.
* | author updateRoger Szabo2017-03-101-0/+1
| | | | | | | | Signed-off-by: Roger Szabo <roger.szabo@web.de>
* | improvement of userAgent variable assigmentRoger Szabo2017-03-101-1/+1
| | | | | | | | Signed-off-by: Roger Szabo <roger.szabo@web.de>
* | log user agent globally insteadRoger Szabo2017-03-101-0/+2
| | | | | | | | Signed-off-by: Roger Szabo <roger.szabo@web.de>
* | Revert unintentional log timestamp format changeJoas Schilling2017-01-301-1/+1
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix default value for logdateformat - fixes #3107Morris Jobke2017-01-191-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* log version number in each log lineMorris Jobke2016-10-061-2/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Changed logtype to file instead of owncloud.Thomas Pulzer2016-07-221-0/+185
- Updated the config sample to point to log_type='file' - Renamed the Class for logfile logging to File in namespace 'OC\Log\'. Changed the occurrences of 'OC\Log\Owncloud' to 'OC\Log\File'. - Renamed the Class for log:file command to File in namespace 'OC\Core\Command\Log\File'. Changed registration of the command to use 'OC\Core\Command\Log\File'. - Changed default Syslog tag to Nextcloud - Retained backwards compatibility for configs with 'logtype' => 'owncloud' - Adjusted tests for the new file log. Closes #490.