aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Log
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Update license headers for 18Christoph Wurst2019-12-201-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-058-19/+29
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix logger testRoeland Jago Douma2019-11-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Sensitive values handlingRoeland Jago Douma2019-11-271-2/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-223-3/+2
| | | | | | | | | | | * 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>
* Do not escape slashes in log jsonJulius Härtl2019-10-071-2/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Make sure SystemConfig class can be injected and syslog_tag is fetched properlyJulius Härtl2019-08-131-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Move log detail aggregation to separate class and reuse it in syslog/systemd ↵Julius Härtl2019-07-174-66/+115
| | | | | | logger Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix class might be undefinedJoas Schilling2019-05-081-2/+2
| | | | | | Co-Authored-By: blizzz <blizzz@arthur-schiwon.de> Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* remove args from logging of common-spelled methods dependent on classArthur Schiwon2019-05-071-10/+24
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* remove setup args from loggingArthur Schiwon2019-05-061-0/+8
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Remove sensitive SMB arguments from exception logMorris Jobke2019-03-121-0/+6
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Don't log parameters on user creation in case of error/exceptionJoas Schilling2019-01-101-0/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* 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>
* make exception serializer a bit more robustRobin Appelman2018-07-181-3/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Sanitize parameters in createSessionToken() while loggingMorris Jobke2018-07-111-0/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Revert "Fix undeclared method warning in phan"Morris Jobke2018-07-031-1/+0
| | | | | | This reverts commit f3093b24016f42843d92a1a59cf955692bac57d1. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix undeclared method warning in phanMorris Jobke2018-07-021-0/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Added Systemd.log documentation to config.sample.phpJohannes Ernst2018-06-292-4/+14
| | | | | | | | Changed name of default system (not systemd) logger from ownCloud to Nextcloud, to be consistent Fixed license per https://github.com/nextcloud/server/pull/9760#discussion_r195026784 Pulled upstream updates Signed-off-by: Johannes Ernst <jernst@indiecomputing.com>
* Added a logger for systemd/journaldJohannes Ernst2018-06-292-0/+71
| | | | | | Added a unit test Signed-off-by: Johannes Ernst <jernst@indiecomputing.com>
* use SystemConfig, less dependencies, and not publicly neededArthur Schiwon2018-04-262-24/+17
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* log to $datadir/audit.log by default and add rotationArthur Schiwon2018-04-261-16/+10
| | | | 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>
* improve Syslog a littleArthur Schiwon2018-04-261-3/+6
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* revert Log's dependency to SystemConfig to work during InstallationArthur Schiwon2018-04-261-1/+8
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* move IFileBased to public namespace, logreader needs itArthur Schiwon2018-04-262-30/+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-265-48/+37
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>