summaryrefslogtreecommitdiffstats
path: root/lib/private/Log
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* destaticfy Log classesArthur Schiwon2018-04-266-49/+155
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* move log constants to ILoggerArthur Schiwon2018-04-263-7/+12
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Log classnames of arguments in exception traceRobin Appelman2018-04-171-0/+140
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #8946 from nextcloud/log-exceptions-as-nested-array-2Morris Jobke2018-04-111-1/+1
|\ | | | | Log exceptions as nested array instead of encoded json
| * Log exceptions as nested array instead of encoded jsonRobin Appelman2018-04-101-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Set the default log rotate size to 100 MBMorris Jobke2018-04-111-1/+1
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use ::class statement instead of stringMorris Jobke2018-01-291-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* 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>