aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Log
Commit message (Collapse)AuthorAgeFilesLines
* Log all deprecations with debug levelChristoph Wurst2022-11-021-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Refactor the ErrorHandler into a dynamic classChristoph Wurst2022-11-021-45/+38
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #33047 from nextcloud/fix/ijob-logger-deprecatedCarl Schwan2022-08-231-1/+1
|\ | | | | Deprecated ILogger from IJob
| * Port existing server code to new interfaceCarl Schwan2022-08-081-1/+1
| | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | allow apps to specify methods carrying sensitive parametersArthur Schiwon2022-07-281-3/+10
|/ | | | | | … in order to remove them from logging. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #32242 from nextcloud/fix-logging-data-arrayblizzz2022-06-211-1/+3
|\ | | | | Fix logging data context to file
| * Fix logging data context to fileThomas Citharel2022-05-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | It was only logged when an exception was provided or when using logData (which is not being much used). We make sure the interpolated parameters are not logged. Only tested with file write logger, but shouldn't work differently. Crash reporters always had the context. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* | make placeholder a const for reuseArthur Schiwon2022-06-161-2/+4
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | fix overwriting original vars when loggingArthur Schiwon2022-06-161-2/+4
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Allow to get custom loggers for syslog, errorlog and systemdlog tooJoas Schilling2022-01-194-7/+36
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix DateTime constructor calls with nullCôme Chilliet2021-11-231-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Always list the class of an object firstJulius Härtl2021-08-051-3/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Set a maximum level of encoding nested arguments of exception tracesJulius Härtl2021-08-051-3/+18
| | | | | | | | This will make sure that nested objects or arrays do not cause exceeding the maximum nesting level of functions when parsing arguments of an exception trace Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Sanitize more functions from the encryption appLukas Reschke2021-07-211-1/+57
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Mask password for Redis and RedisCluster on connection failureDaniel Kesselberg2021-07-191-0/+6
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Correctly skip suppressed errors in PHP 8.0Chih-Hsuan Yen2021-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Applies the suggested transformation mentioned in https://www.php.net/manual/en/migration80.incompatible.php, > The @ operator will no longer silence fatal errors (E_ERROR, > E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR, > E_PARSE). Error handlers that expect error_reporting to be 0 when > @ is used, should be adjusted to use a mask check instead The new code still works on PHP 7, as error_reporting() already returns 0 when diagnostics are suppressed. This fixes https://github.com/nextcloud/server/issues/25807 in PHP 8.0. For PHP 7.x, https://github.com/nextcloud/server/pull/22243 suppresses the E_NOTICE message from the second session_start() call with the error suppression operator @, and thus those E_NOTICE messages are still logged in PHP 8.0. See also https://github.com/nextcloud/server/issues/25806 Signed-off-by: Chih-Hsuan Yen <yan12125@gmail.com>
* Migrate HintException to OCPGary Kim2021-06-302-2/+2
| | | | Signed-off-by: Gary Kim <gary@garykim.dev>
* Merge pull request #27635 from nextcloud/fix/datetime-constantsPytal2021-06-231-1/+1
|\ | | | | Fix usage of DateTime constants
| * Move DateTime::ATOM to DateTimeInterface::ATOMChristoph Wurst2021-06-231-1/+1
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Merge pull request #26346 from J0WI/clean-auth-regexblizzz2021-06-231-1/+1
|\ \ | |/ |/| Cleaner removePassword regex
| * Cleaner removePassword regexJ0WI2021-03-271-1/+1
| | | | | | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* | Move exception logging to separate fieldJulius Härtl2021-06-101-5/+9
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Update php licensesJohn Molakvoæ (skjnldsv)2021-06-049-16/+6
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Log deprecation only as debugJoas Schilling2021-04-261-0/+2
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Respect the error level when loggingJoas Schilling2021-04-261-2/+17
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Migrate custom loggers to PSRChristoph Wurst2021-02-112-3/+17
| | | | | | This will help phase out the deprecated ILogger interface. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Don't log keys on checkSignatureJoas Schilling2021-01-181-0/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.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>
* Avoid huge exception argument loggingRoeland Jago Douma2020-12-291-3/+21
| | | | | | | | | | | | | In some cases it might happen that you have an argument that deep down somewhere has an array with a lot of entries (think thousands). Now before we would just happily print them all. Which would fill the log. Now it will just print the first 5. And add a line that there are N more. If you are on debug level we will still print them all. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-162-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Don't log params of imagecreatefromstringVincent Petry2020-12-041-0/+3
| | | | | | To prevent flooding the log with actual image data. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-052-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Generate exception to log on php errorsJulius Härtl2020-09-291-2/+4
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make the PSR-3 adapter exception-awareChristoph Wurst2020-07-141-9/+106
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Move OC_Mount_Config to proper classname and remove OC::$CLASSPATH usage in ↵Morris Jobke2020-07-101-1/+1
| | | | | | files_external Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix chmod on file descriptorJ0WI2020-07-031-1/+1
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Don't log KeysJoas Schilling2020-06-191-1/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headers for 19Christoph Wurst2020-04-296-2/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-101-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-107-15/+10
| | | | | | | | | | | | | | | 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 elseif instead of else ifChristoph Wurst2020-04-101-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-092-0/+2
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #18200 from nextcloud/enhancement/psr-loggerChristoph Wurst2020-04-081-0/+166
|\ | | | | Add a PSR-3 logger adapter and make it injectable
| * Add a PSR-3 logger adapter and make it injectableChristoph Wurst2020-03-261-0/+166
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Update the license headers for Nextcloud 19Christoph Wurst2020-03-313-0/+3
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Merge pull request #20170 from nextcloud/techdebt/remove-unused-importsChristoph Wurst2020-03-271-1/+0
|\ \ | | | | | | Remove unused imports
| * | Remove unused importsChristoph Wurst2020-03-251-1/+0
| |/ | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* / Use the short array syntax, everywhereChristoph Wurst2020-03-262-9/+9
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* always require a message paramter for data loggingArthur Schiwon2020-01-281-0/+10
| | | | | | also ensure it plays well with current log reader Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>