aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/LoggerTest.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: Add SPDX headerAndy Scherzinger2024-05-131-7/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix logging data context to fileThomas Citharel2022-05-021-8/+25
| | | | | | | | | | | | | 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>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-121-2/+2
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-5/+5
| | | | | | | | | | | | | | | 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>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix the LoggerTests for phpunitRoeland Jago Douma2020-01-061-21/+21
| | | | | | Less deprecation warnings. YAY. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* remove test caseRoeland Jago Douma2019-11-271-1/+0
| | | | | | Because we test very naively we matched also on def in default... Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* revert Log's dependency to SystemConfig to work during InstallationArthur Schiwon2018-04-261-2/+2
| | | | 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-4/+5
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* destaticfy Log classesArthur Schiwon2018-04-261-26/+7
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* move log constants to ILoggerArthur Schiwon2018-04-261-1/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Log exceptions as nested array instead of encoded jsonRobin Appelman2018-04-101-5/+20
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Pass log level to log reportersMorris Jobke2017-11-271-4/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Pass the exception context to the crash reporterChristoph Wurst2017-11-141-4/+4
| | | | | | | | This should allow better reports as often the app id is passed as context. While this is not used right now, I'd like to have this for NC13 as adding it later will break the interface for existing apps Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add a mechanism to register crach reportersChristoph Wurst2017-11-141-12/+35
| | | | | | | | This adds a crash reporter registry, which is meant for third party apps to hook into the error logging/reporting chain. This way, external tools like Sentry can be used to track and aggregate system crashes. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unit tests for #6977Joas Schilling2017-10-271-0/+26
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Better fallback for unknown log typesJoas Schilling2017-01-101-2/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add testsJoas Schilling2017-01-091-0/+16
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* add testArthur Schiwon2016-08-221-0/+16
|
* Do not log token or challenge with exception stacktrace (#25026)Joas Schilling2016-06-081-3/+3
| | | | | | * Make the filtering better readable * Add some more methods to the sensitive list
* Move tests/ to PSR-4 (#24731)Joas Schilling2016-05-201-0/+125
* Move a-b to PSR-4 * Move c-d to PSR-4 * Move e+g to PSR-4 * Move h-l to PSR-4 * Move m-r to PSR-4 * Move s-u to PSR-4 * Move files/ to PSR-4 * Move remaining tests to PSR-4 * Remove Test\ from old autoloader