aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Log
Commit message (Collapse)AuthorAgeFilesLines
* Move away from deprecated utf_encode() on PHP 8.2+Git'Fellow2024-02-201-1/+1
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Fix log rotation notification level (warning->info)Josh Richards2024-01-011-1/+1
| | | | | Fixes #42537 Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
* Refactors lib/private/Log.Faraz Samapoor2023-06-2810-149/+77
| | | | | | Mainly using PHP8's constructor property promotion. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* emit an event when a message is loggedRobin Appelman2023-06-131-0/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-151-1/+1
| | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* Use typed version of IConfig::getSystemValue as much as possibleCôme Chilliet2023-04-051-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: treat text app session parameters as sensitive valuesMax2023-03-011-0/+10
| | | | | | | | | | * `PublicSessionController create` receives a share token. * The others receive the parameters for a text session: `document_id`, `session_id`, `session_token`. Even though these are relatively short lived they could be used to retrieve content from the document when leaked. Signed-off-by: Max <max@nextcloud.com>
* composer run cs:fixCôme Chilliet2023-01-205-6/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(ExceptionSerializer): encode arguments before filtering the traceJulius Härtl2023-01-161-3/+3
| | | | | | | | This will avoid running into a Nesting level too deep error as the encodeArg calls will limit potential recursive calls on the arguments to a nesting level of 5 Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix(logging): Fix array to string conversion in errorlog writerChristoph Wurst2022-12-194-9/+12
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore(logging): Fix branding of errorlog log messagesChristoph Wurst2022-12-051-1/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* 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>