Skip to content
Open
Changes from 4 commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
7bdb0d8
fix: Convert full source paths to relative in logs
Aiiaiiio Oct 2, 2025
39daf3b
fix: typo in comment
Aiiaiiio Oct 2, 2025
256430f
fix: omit filenames from the log in release mode
Aiiaiiio Oct 2, 2025
a3f761f
fix: removing unnecessary define from CMakeLists.txt
Aiiaiiio Oct 2, 2025
4a4a717
fix: show account label in tray hover
Rello Oct 1, 2025
33b668f
feat(vfs/folders): enable on demand fetch of folder content
mgallien Jun 6, 2025
1abd860
feat(vfs/folders): enable on demand fetch of folder content
mgallien Jun 6, 2025
9213c25
fix: once a folder has been populated, disable it
mgallien Jul 3, 2025
4e439d7
fix: code style fix
mgallien Jul 3, 2025
37b0454
fix(vfs/folders): track state of folders using a new blacklist type
mgallien Jul 8, 2025
f53af9a
fix: makes sure we do fetch empty folders again
mgallien Jul 9, 2025
7f1661b
fix(vfs/folders-on-demand): do not black list virtual folders
mgallien Jul 9, 2025
8a2d2d1
fix(vfs/folders-on-demand): use proper item type for virtual folders
mgallien Jul 9, 2025
11c460a
fix(vfs/windows): handle virtual directories as virtual directories
mgallien Sep 23, 2025
66a7a08
fix(vfs/windows): update folder type when populated
mgallien Sep 23, 2025
007f778
fix(vfs/windows): virtual folders are folders
mgallien Sep 24, 2025
17866f8
fix(vfs/windows): properly update DB record when folder is not virtual
mgallien Sep 24, 2025
404a09e
chore(vfs/windows): more logs for fetch placeholders callback
mgallien Sep 25, 2025
29239db
fix(vfs/windows): fix creation of items inside virtual folders
mgallien Sep 25, 2025
2e87f45
fix(vfs/xattr): fix compilation of vfs xattr experimental plug-in
mgallien Sep 26, 2025
80965f7
fix(db): assert if we insert a DB record with empty path
mgallien Sep 26, 2025
3bcaf69
fix(tests): ensure we do not access items in empty QList
mgallien Sep 26, 2025
8c3e417
fix(propagator): do not create invalid records when propagating
mgallien Sep 26, 2025
724b668
fix(vfs/discovery): do not recurse inside a virtual folder
mgallien Sep 26, 2025
0f358fe
chore(webdav): makes webdav proprty parsing code into reusable method
mgallien Sep 28, 2025
28a0f89
chore(db): do not create db records with invalid mtime
mgallien Sep 28, 2025
8fde220
fix(vfs/windows): fix issues with folders on-demand DB records
mgallien Sep 28, 2025
6d9409a
fix(vfs): fix regressions with folders on-demand tests
mgallien Sep 30, 2025
88a9d60
chore(ci/linux): update the CI images for linux CI compilation and tests
mgallien Sep 30, 2025
7af9c12
chore(vfs/windows): log items pattern when fetching placeholders
mgallien Sep 30, 2025
eec39be
chore(vfs/windows): expect failed tests on windows VFS
mgallien Sep 30, 2025
80c6c90
chore(vfs/windows): common method for WebDAV proprties list
mgallien Oct 1, 2025
974bd60
chore: fix common issue with one wrong variable name
mgallien Oct 1, 2025
7b2c7fd
chore: simplify code
mgallien Oct 1, 2025
1a277c5
feat: allow usage of public link to shared folders as an account URL
mgallien Jan 13, 2022
b94b47b
fix(proxy): only clean legacy proxy settings after migrating all acco…
camilasan Oct 1, 2025
6844115
fix(accountsettings): do not to initialize e2ee if account is disconn…
camilasan Oct 2, 2025
31fead1
fix: ignore Qt6 WebEngineCore PDB file that is too big for Wix Toolset 3
mgallien Jul 1, 2025
4daa934
fix: fix syntax issues in main dialog to have it work again
mgallien Oct 2, 2025
a0a740a
fix(l10n): Update translations from Transifex
nextcloud-bot Oct 3, 2025
c629037
chore: prepare for 4.1 release
mgallien Oct 3, 2025
e6d4217
fix: allow settings window to enter full screen or be minimized
elsiehupp Oct 3, 2025
bdbe552
fix(l10n): Update translations from Transifex
nextcloud-bot Oct 4, 2025
5e15ee1
fix(l10n): Update translations from Transifex
nextcloud-bot Oct 5, 2025
1f50ffe
fix(l10n): Update translations from Transifex
nextcloud-bot Oct 6, 2025
f801c96
fix(sync/publicShareLinks): fix public share link detection
mgallien Oct 3, 2025
30d4e42
fix: fix typo in log message
mgallien Oct 6, 2025
767e3f4
fix: do not show share ID for sidebar entries of public share links
mgallien Oct 6, 2025
50e53bc
feat: Use upstream extra cmake modules
claucambra Jun 12, 2024
186767a
fix: Mark nextcloudcmd as non gui executable
claucambra Jun 12, 2024
081df19
fix: Fix ecm_add_app_icon calls
claucambra Jun 13, 2024
bc24a9e
fix: Update upstream URL for Extra CMake Modules
claucambra Jun 23, 2024
58aa1c6
fix(reuse): remove no longer needed BSD-2 license
mgallien Jul 9, 2025
1cf0194
fix(test/csync): make sure the test executable can be found to be run
mgallien Jul 9, 2025
b6a6094
fix: proper use of ecm_add_app_icon
mgallien Jul 15, 2025
9995628
chore(ci): use a docker linux image for CI which has extra-cmake-modules
mgallien Oct 6, 2025
4747b7f
feat: Nextcloud Developer Build from Integration Project
i2h3 Oct 2, 2025
1fc59e9
fix: Source mapping for extensions in Xcode debugger.
i2h3 Oct 6, 2025
d9fc94d
fix: Improved one logging call.
i2h3 Oct 6, 2025
6a0db5a
fix: Updated NextcloudFileProviderKit reference.
i2h3 Oct 6, 2025
153c46c
fix: Updated NextcloudFileProviderKit to 3.2.1
i2h3 Oct 6, 2025
db430b9
fix(l10n): Update translations from Transifex
nextcloud-bot Oct 7, 2025
e4c8ba8
chore: fix all occurence of range-loop-detach clazy warning
mgallien Aug 29, 2025
9fc0dc9
fix: folder delete/new conflict will be "delete"
mgallien Aug 26, 2025
49f1cfc
feat(propagation): flexible way to configure special actions on items
mgallien Aug 29, 2025
b5ff078
chore: adjust logs level and clazy warnings for permanent deletions
mgallien Aug 29, 2025
ad82579
feat(conflict): use local device trashbin for delete/new conflicts
mgallien Sep 1, 2025
049ffc5
feat(conflict): use local device trashbin for delete/new conflicts
mgallien Sep 1, 2025
85c5e09
chore(autotests): folders on-demand breaks the new test: skip it
mgallien Oct 6, 2025
5b688de
fix: Added some macOS-specific items to .gitignore
i2h3 Oct 7, 2025
5051b67
feat: Branded file provider extension SF Symbol.
i2h3 Oct 1, 2025
9813702
feat(file-provider): Integrated localizations from Transifex.
i2h3 Oct 7, 2025
0ef6f57
chore(deps): Bump fsfe/reuse-action from 5.0.0 to 6.0.0
dependabot[bot] Oct 6, 2025
e3ec58e
chore(deps): Bump actions/stale from 10.0.0 to 10.1.0
dependabot[bot] Oct 7, 2025
e43077e
chore(deps): Bump cpp-linter/cpp-linter-action from 2.16.4 to 2.16.5
dependabot[bot] Oct 7, 2025
cf44a78
fix(l10n): Update translations from Transifex
nextcloud-bot Oct 8, 2025
32617f1
fix(asyncimageresponse): fetch remote resources in the same thread as…
nilsding Oct 8, 2025
f7a62d1
chore(chunk-upload): always sent the total size header
mgallien Oct 8, 2025
d4c144a
Refactor addAccountButton properties for icon sizing
Rello Oct 8, 2025
1da2fcf
fix: Removing non-existent properties
Aiiaiiio Oct 8, 2025
f7d06b8
fix: Tweaking account dropdown menu style
Aiiaiiio Oct 8, 2025
7d9bb86
fix: handle single quotes in file paths for conflict and case clash d…
Copilot Oct 8, 2025
574e57c
fix: properly HTML-escape URLs to handle both single and double quotes
Copilot Oct 8, 2025
7a4db91
fix(l10n): Update translations from Transifex
nextcloud-bot Oct 9, 2025
2f685c4
fix(filesystembase): log correct ACL errors
nilsding Oct 9, 2025
08fe60d
fix: Adding elide to menuitems
Aiiaiiio Oct 9, 2025
2d1f52b
fix(l10n): Update translations from Transifex
nextcloud-bot Oct 10, 2025
c6ecc77
fix(l10n): Update translations from Transifex
nextcloud-bot Oct 11, 2025
7b4fe33
fix(l10n): Update translations from Transifex
nextcloud-bot Oct 12, 2025
acee80a
fix(i18n): Fixed grammar
rakekniven Oct 13, 2025
a77107c
fix(test): adapt updated error message strings
nilsding Oct 13, 2025
54a8f3a
fix(l10n): Update translations from Transifex
nextcloud-bot Oct 13, 2025
8c05564
fix(file-provider): Updated logging calls in extension implementation.
i2h3 Oct 9, 2025
a1d2b8c
fix(file-provider): Updated NextcloudKit and NextcloudFileProviderKit…
i2h3 Oct 13, 2025
0eeff94
fix(l10n): Update translations from Transifex
nextcloud-bot Oct 14, 2025
6712d31
fix(NextcloudDev): add missing template file.
camilasan Oct 13, 2025
dbde1f5
fix: revert 3cd559f
Aiiaiiio Oct 14, 2025
c15e464
fix: Revert "fix: typo in comment"
Aiiaiiio Oct 14, 2025
587b531
fix: Revert "fix: Convert full source paths to relative in logs"
Aiiaiiio Oct 14, 2025
93c1c84
fix: Adding `-fmacro-prefix-map` compiler option to make paths relative
Aiiaiiio Oct 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions src/libsync/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <QDir>
#include <QRegularExpression>
#include <QStringList>
#include <QtGlobal>
#include <QTextCodec>
#include <QtGlobal>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change really needed ?

#include <qmetaobject.h>

#include <iostream>
Expand Down Expand Up @@ -61,7 +61,8 @@ static bool compressLog(const QString &originalName, const QString &targetName)

}

namespace OCC {
namespace OCC
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert
current style is
namespace OCC {


Q_LOGGING_CATEGORY(lcPermanentLog, "nextcloud.log.permanent")

Expand All @@ -74,8 +75,7 @@ Logger *Logger::instance()
Logger::Logger(QObject *parent)
: QObject(parent)
{
qSetMessagePattern(QStringLiteral("%{time yyyy-MM-dd hh:mm:ss:zzz} [ %{type} %{category} %{file}:%{line} "
"]%{if-debug}\t[ %{function} ]%{endif}:\t%{message}"));
qSetMessagePattern(QStringLiteral("%{time yyyy-MM-dd hh:mm:ss:zzz} [%{type} %{category}]:\t%{message}; %{function} %{if-debug}%{file}%{endif}:%{line}"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do not change the order ?
omitting the file may save some characters but we should keep the order unchanged to not break possibly existing parsers for the logs

_crashLog.resize(CrashLogSize);
#ifndef NO_MSG_HANDLER
s_originalMessageHandler = qInstallMessageHandler([](QtMsgType type, const QMessageLogContext &ctx, const QString &message) {
Expand All @@ -94,7 +94,6 @@ Logger::~Logger()
#endif
}


void Logger::postGuiLog(const QString &title, const QString &message)
{
emit guiLog(title, message);
Expand All @@ -114,7 +113,8 @@ bool Logger::isLoggingToFile() const
void Logger::doLog(QtMsgType type, const QMessageLogContext &ctx, const QString &message)
{
static long long int linesCounter = 0;
const auto &msg = qFormatLogMessage(type, ctx, message);
QString msg = qFormatLogMessage(type, ctx, message);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
QString msg = qFormatLogMessage(type, ctx, message);
const auto msg = qFormatLogMessage(type, ctx, message);


#if defined Q_OS_WIN && ((defined NEXTCLOUD_DEV && NEXTCLOUD_DEV) || defined QT_DEBUG)
// write logs to Output window of Visual Studio
{
Expand Down Expand Up @@ -146,9 +146,8 @@ void Logger::doLog(QtMsgType type, const QMessageLogContext &ctx, const QString
if (_logstream) {
(*_logstream) << msg << "\n";
++_linesCounter;
if (_doFileFlush ||
_linesCounter >= MaxLogLinesBeforeFlush ||
type == QtMsgType::QtWarningMsg || type == QtMsgType::QtCriticalMsg || type == QtMsgType::QtFatalMsg) {
if (_doFileFlush || _linesCounter >= MaxLogLinesBeforeFlush || type == QtMsgType::QtWarningMsg || type == QtMsgType::QtCriticalMsg
|| type == QtMsgType::QtFatalMsg) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment (code style)

_logstream->flush();
_linesCounter = 0;
}
Expand All @@ -171,8 +170,7 @@ void Logger::doLog(QtMsgType type, const QMessageLogContext &ctx, const QString

void Logger::closeNoLock()
{
if (_logstream)
{
if (_logstream) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please split code style fixes into a separate commit
makes it easier to selectively revert or test changes while keeping code style improvements

_logstream->flush();
_logFile.close();
_logstream.reset();
Expand Down Expand Up @@ -244,7 +242,7 @@ void Logger::setupTemporaryFolderLogDir()
QFile::Permissions perm = QFile::ReadOwner | QFile::WriteOwner | QFile::ExeOwner;
QFile file(dir);
file.setPermissions(perm);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

setLogDebug(true);
setLogExpire(4 /*hours*/);
setLogDir(dir);
Expand Down Expand Up @@ -287,7 +285,6 @@ void Logger::dumpCrashLog()
void Logger::enterNextLogFileNoLock(const QString &baseFileName, LogType type)
{
if (!_logDirectory.isEmpty()) {

QDir dir(_logDirectory);
if (!dir.exists()) {
dir.mkpath(".");
Expand All @@ -314,7 +311,7 @@ void Logger::enterNextLogFileNoLock(const QString &baseFileName, LogType type)
const QRegularExpression rx(regexpText);
int maxNumber = -1;
const auto collidingFileNames = dir.entryList({QStringLiteral("%1.*").arg(newLogName)}, QDir::Files, QDir::Name);
for(const auto &fileName : collidingFileNames) {
for (const auto &fileName : collidingFileNames) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

const auto rxMatch = rx.match(fileName);
if (rxMatch.hasMatch()) {
maxNumber = qMax(maxNumber, rxMatch.captured(1).toInt());
Expand All @@ -323,8 +320,7 @@ void Logger::enterNextLogFileNoLock(const QString &baseFileName, LogType type)
newLogName.append("." + QString::number(maxNumber + 1));

auto previousLog = QString{};
switch (type)
{
switch (type) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

case OCC::Logger::LogType::Log:
previousLog = _logFile.fileName();
setLogFileNoLock(dir.filePath(newLogName));
Expand Down
Loading