Git'Fellow
3bbe0ee570
refactor: use strict operator
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2026-04-30 00:51:29 +02:00
Ferdinand Thiessen
e0ba4d71b6
chore: add missing Override attribute to OC
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-28 21:29:27 +02:00
Carl Schwan
7b6078875b
refactor: Run rector on lib/private
...
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:50:18 +01:00
Côme Chilliet
cb80ec7ebb
feat(log): Add script name and occ command to log details
...
This will help when troubleshooting issues. For web request we have
method and url, but for cron and occ currently we have no way to know if
it’s one or the other and which command.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-12-04 15:04:59 +01:00
Anna Larch
ace9ba487e
fix(logger): add back lost params for logger methods
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2025-11-27 13:44:07 +01:00
Kent Delante
eb58d2bb5a
fix(syslog): open syslog channel on write
...
This fixes a bug where only one tag gets used when multiple tags have
been configured (e.g. different tags for 'syslog_tag' and 'syslog_tag_audit')
Signed-off-by: Kent Delante <kent.delante@proton.me>
2025-07-02 09:14:33 +08:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
# Conflicts:
# apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +02:00
Salvatore Martire
5fef6f1c90
fix: make rotate logs a TimedJob and run every hour
...
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
2025-06-24 09:55:23 +02:00
Christoph Wurst
e736823fc7
fix(log): map all warnings to warn log level, notice to info
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2025-05-27 08:01:19 +02:00
Côme Chilliet
2b4bfcc212
fix(log): Only log client request id if present, and at the end
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-14 00:35:21 +02:00
Côme Chilliet
4c25654574
feat(log): Log the request id sent with the request
...
This should help matching client logs with server logs, hopefully.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-14 00:35:21 +02:00
Arthur Schiwon
fe52a03ff8
fix(Log): revert swich to ?? operator
...
false is expected, not null. The changed caused "user" in the log files
to be false instead of "--", which is breaking behaviour.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2025-04-17 14:26:38 +02:00
Joas Schilling
8952a4cb77
fix(logger): Fix closure detection when filtering sensitive parameters
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-11-08 12:59:14 +01:00
Ferdinand Thiessen
f3aa004b1c
refactor(encryption): Migrate away from Hooks to typed events
...
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Louis <louis@chmn.me>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-15 18:33:06 +02:00
Joas Schilling
a90921e239
fix(logger): Remove more parameters of other methods
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-10-07 21:04:49 +02:00
provokateurin
9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +02:00
Ferdinand Thiessen
5cce140701
chore: Remove deprecated ILogger logging functions
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-19 00:37:06 +02:00
Christoph Wurst
c57e684e7b
fix: Handle null checks with the ?? operator
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 21:50:11 +02:00
Christoph Wurst
614f9ec0a2
refactor: Use the elvis operator
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 21:01:34 +02:00
Ferdinand Thiessen
81df2d2c12
feat(PsrLoggerAdapter): Allow to use Psr\Log\LogLevel for log method
...
There is the `Psr\Log\LogLevel` class defining loglevel constants,
to be fully compatible we should at least support those logging levels.
Moreover this is the last part that was still required from `ILogger` interface,
as we did not have alternatives for the loglevel constants.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-14 17:35:11 +02:00
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +02:00
Andy Scherzinger
dae7c159f7
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +02:00
Marcel Klehr
4a3b9b826e
refactor: identifier is now customId/custom_id
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2024-05-14 11:38:41 +02:00
Ferdinand Thiessen
f06bf0413d
fix(PsrLoggerAdapter): Adjust code to comply with v2 of Psr\Log (allow \Stringable as message)
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-04-16 11:51:04 +02:00
Git'Fellow
d753d04760
Move away from deprecated utf_encode() on PHP 8.2+
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-02-17 21:37:34 +01:00
Côme Chilliet
c0ce272e9c
chore: Migrate away from OC::$server->getLogger
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-13 17:32:30 +01:00
Josh Richards
7a212b1f38
Fix log rotation notification level (warning->info)
...
Fixes #42537
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
2023-12-31 20:26:39 -05:00
Faraz Samapoor
9fa9975bc9
Refactors lib/private/Log.
...
Mainly using PHP8's constructor property promotion.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
2023-06-28 09:29:45 +03:30
Robin Appelman
d9fa7b1e28
emit an event when a message is logged
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-06-13 18:45:48 +02:00
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
...
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +03:30
Côme Chilliet
426c0341ff
Use typed version of IConfig::getSystemValue as much as possible
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 12:50:08 +02:00
Max
95a674e238
fix: treat text app session parameters as sensitive values
...
* `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>
2023-03-01 13:03:47 +01:00
Côme Chilliet
f5c361cf44
composer run cs:fix
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +01:00
Julius Härtl
7daa20d309
fix(ExceptionSerializer): encode arguments before filtering the trace
...
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>
2023-01-16 09:47:31 +01:00
Christoph Wurst
58a0740794
fix(logging): Fix array to string conversion in errorlog writer
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-12-19 09:31:55 +01:00
Christoph Wurst
94cebfea7c
chore(logging): Fix branding of errorlog log messages
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-12-05 19:28:05 +01:00
Christoph Wurst
4c8ec6dc89
Log all deprecations with debug level
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-11-02 09:49:37 +01:00
Christoph Wurst
052dcdebe8
Refactor the ErrorHandler into a dynamic class
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-11-02 09:49:37 +01:00
Carl Schwan
b888c61463
Merge pull request #33047 from nextcloud/fix/ijob-logger-deprecated
...
Deprecated ILogger from IJob
2022-08-23 16:55:42 +02:00
Carl Schwan
48d9c4d2b0
Port existing server code to new interface
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-08 17:03:19 +02:00
Arthur Schiwon
2a6f46e689
allow apps to specify methods carrying sensitive parameters
...
… in order to remove them from logging.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-07-28 23:30:17 +02:00
blizzz
cf5452e633
Merge pull request #32242 from nextcloud/fix-logging-data-array
...
Fix logging data context to file
2022-06-21 18:49:08 +02:00
Arthur Schiwon
8b2b5946e6
make placeholder a const for reuse
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-06-16 18:38:29 +02:00
Arthur Schiwon
891c10d09d
fix overwriting original vars when logging
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-06-16 18:36:58 +02:00
Thomas Citharel
1e7d924c61
Fix logging data context to file
...
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>
2022-05-02 19:29:35 +02:00
Joas Schilling
4c41abd816
Allow to get custom loggers for syslog, errorlog and systemdlog too
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-19 16:15:14 +01:00
Côme Chilliet
3a1b3745eb
Fix DateTime constructor calls with null
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:58 +01:00
Julius Härtl
b235a854d3
Always list the class of an object first
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-08-05 17:36:15 +02:00
Julius Härtl
950de74d1d
Set a maximum level of encoding nested arguments of exception traces
...
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>
2021-08-05 17:35:52 +02:00
Lukas Reschke
b3ddc09895
Sanitize more functions from the encryption app
...
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-07-21 11:18:35 +02:00