Matthieu Gallien
dddbe9193d
rotate logs based on the lines count instead of teh file size
...
will omit querying teh file size repeatedly (and not cost free)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-12 17:57:00 +02:00
Matthieu Gallien
360fd93397
rotate the logs less often (around every 3 MB of compressed logs)
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-09 16:24:20 +02:00
Matthieu Gallien
5a86446f91
do not log twice in debug mode
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-06 16:32:19 +02:00
Matthieu Gallien
a34bac35b7
rotate log files every 3 MBs
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-06 16:32:18 +02:00
Matthieu Gallien
9c8b624ef7
protect all access to shared data by mutexes
...
separate public methods that must lock and private methods that must not
lock
will avoid deadlock or unprotected accesses
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-04-21 10:32:43 +02:00
Matthieu Gallien
c2d72109b6
protext all access to _logstream with the existing mutex
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-04-21 10:32:43 +02:00
Claudio Cambra
1f1d9d6dba
Ensure we are making all file modifications under mutex protection
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-04-21 10:32:43 +02:00
Claudio Cambra
711359ef43
Ensure we are closing current log file before entering next log file
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-04-21 10:32:43 +02:00
Claudio Cambra
eed5ca17bd
Enter next log file if the current log file is larger than 512 KB when writing log line
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-04-11 23:10:03 +02:00
Claudio Cambra
4d9fef81c9
Log to stdout when in debug mode
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-02-13 19:59:46 +01:00
Claudio Cambra
4b380dc23a
Fix indentation in logger constructor
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-02-13 19:59:46 +01:00
Claudio Cambra
ce57d3b3ab
Declare all QRegularExpressions statically
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2022-12-20 18:38:24 +01:00
Matthieu Gallien
31b2146a17
use nextcloud.log suffix for log files of desktop client
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-12-15 11:11:20 +01:00
Dmytro Korchynskyi
c872514571
write logs to Output window of Visual Studio
...
Signed-off-by: Dmytro Korchynskyi <kdl.dima@gmail.com>
2022-01-12 11:59:34 +02:00
alex-z
c52718c104
Replace deprecated QRegExp with QRegularExpression.
...
Signed-off-by: alex-z <blackslayer4@gmail.com>
2021-11-02 08:54:06 +00:00
Felix Weilbach
1156d82594
Log file name and line number
...
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-10-19 17:10:44 +00:00
Felix Weilbach
2fe3a7947e
endl has been deprecated
...
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-08 08:54:00 +00:00
Hannah von Reth
10e02b0031
Don't create QStringList copy first
2021-08-23 09:44:34 +02:00
Hannah von Reth
44fa4aad88
Always call doLog to ensure we get a crash log
2021-08-23 09:44:34 +02:00
Hannah von Reth
df567efd37
Remove dead code
2021-08-23 09:44:34 +02:00
Hannah von Reth
990ce6ed05
Dump the last 20 lines of logs to a file when we crash
...
Fixes : #8467
2021-08-23 09:44:34 +02:00
Hannah von Reth
ec0466ed73
Allow to add and remove log rules
2021-08-11 17:13:44 +00:00
rakekniven
37b012fcbd
Changed grammar
...
Reported at Transifex.
Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2021-08-02 06:40:50 +00:00
Valdnet
7ebbb499e0
l10n: Replace apostrophe with double quotation
...
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-07-30 06:21:05 +00:00
allexzander
4d66d209bc
Fix incorrect logger output for non-latin strings.
...
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-02-16 09:30:08 +02:00
Christian Kamm
22234e0e73
LogWindow: Remove output, add "go to log folder" button #6475
2020-12-15 10:58:47 +01:00
Olivier Goffart
7969067f80
Logger: Guard zlib usage by ZLIB_FOUND
...
Similar to the use for the checksum.
I know that zlib is required in principle, but i don't have it
in one of my test building environment, and it is easier to just
disable it.
2020-12-15 10:57:51 +01:00
Kevin Ottens
607347289e
Expose more of the logger state
...
It is better to rely on the Logger state to know exactly where we're
logging. Indeed due to the the various ways to impact its state the
config alone might not now where we're logging.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-07 13:33:20 +00:00
Kevin Ottens
7996eaae82
Have a filter rule capturing all of nextcloud debug
...
This was half broken before that commit and the previous one since some
of the categories would not be captured.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-01 15:39:52 +02:00
Kevin Ottens
90f757b96b
Repair the log message pattern
...
At last it will become useful again...
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-01 15:39:52 +02:00
Hannah von Reth
5a05c2d6cd
[Logger] Ensure log file is flushed before crash
2020-07-01 15:13:20 +02:00
Hannah von Reth
cd96b4a265
[Logger] Ensure errors are also printed to an attached console
2020-07-01 15:13:20 +02:00
Olivier Goffart
44fc881ced
Logger: Remove the thread pointer from the log.
...
We don't do discovery in a thread or use many threads anymore so this is
just noise.
Also use of QString::sprintf is deprecated, and C cast.
2020-07-01 15:13:20 +02:00
Hannah von Reth
669e42edd1
[Logger] Correctly handle message priority
...
This fixes the flodded sys log.
Fixes : #7453
2020-07-01 15:13:20 +02:00
Hannah von Reth
a57bf0c899
Print critical and fatal messages to stderr
...
That way we might get a reason why the client crashes (dev setup)
2020-07-01 15:13:20 +02:00
Christian Kamm
039d885b76
LogDir: Compress last logfile on restart
...
For #7353
2020-07-01 15:13:20 +02:00
Kevin Ottens
09c9a1c5bc
Properly guard io.h since it is Windows only
...
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-01 15:13:20 +02:00
Dominik Schmidt
b171bd991d
Make -logfile - work on Windows
2020-07-01 14:54:52 +02:00
Dominik Schmidt
fd493a0598
Make qFatal() trigger the crash reporter on Windows
2020-07-01 14:54:32 +02:00
Kevin Ottens
e3e262e42e
Use default member init when applicable
...
This also fixes a couple of warnings at places (out of order init for
instance) and a potential bug in the webflow credentials / qtkeychain
integration.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-03 16:10:39 +02:00
Kevin Ottens
dea6ebaa35
Use nullptr when appropriate
...
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-20 02:21:26 +02:00
Kevin Ottens
9000a880cb
Don't silently kill debug messages
...
The message handler globally installed by the logger silently drop
messages if the logger is not logging. On top of it, it doesn't log
debug messages by default.
Anything not logged is currently silently discarded. This can come as a
surprise to a developer trying to contribute for the first time and
adding some debug message for some reason.
We're thus trying to strike a middle ground which is that debug messages
get a regular output if the logger isn't interested in them.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-12 17:33:13 +02:00
J-P Nurmi
1af9bf8abc
libsync: run clang-tidy modernize-use-nullptr
2018-11-12 18:46:39 +01:00
Roeland Jago Douma
b952fa64ee
Restore logger installation
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-07-02 11:01:52 +02:00
Christian Kamm
4a81ae75cf
Logging: Add persistent auto-logdir option #6442
2018-06-05 20:07:53 +02:00
Christian Kamm
428cfc5e1c
LogDir: Compress log when switching files #6442
2018-06-05 20:07:53 +02:00
Tomaz Canabrava
6c88367ac6
Do not crash if there was an error encrypting the file.
2018-03-26 21:44:46 +02:00
Olivier Goffart
72b9beb79c
Merge remote-tracking branch 'origin/2.4'
...
Conflicts:
shell_integration/nautilus/syncstate.py
2018-01-23 14:08:15 +01:00
Olivier Goffart
c3dbb20ce3
Logger: --logdebug only show owncloud's debug message
...
Recent Qt version show way too many debug messages, spamming the console.
So filter only messages that comes from the client.
2018-01-22 21:13:15 +01:00
Olivier Goffart
3ddd4b6f16
Get rid of csync_log
...
We use Qt's debugging code everywhere
2018-01-13 13:58:17 +01:00