Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
khws4v1
nextcloud-desktop
Commits
7033f160
Commit
7033f160
authored
Jul 01, 2020
by
Kevin Ottens
Committed by
backportbot[bot]
Jul 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to control logFlush from the config file
Signed-off-by:
Kevin Ottens
<
kevin.ottens@nextcloud.com
>
parent
d0848533
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
src/gui/application.cpp
src/gui/application.cpp
+1
-1
src/libsync/configfile.cpp
src/libsync/configfile.cpp
+13
-0
src/libsync/configfile.h
src/libsync/configfile.h
+3
-0
No files found.
src/gui/application.cpp
View file @
7033f160
...
...
@@ -411,7 +411,7 @@ void Application::setupLogging()
logger
->
setLogFile
(
_logFile
);
logger
->
setLogDir
(
!
_logDir
.
isEmpty
()
?
_logDir
:
ConfigFile
().
logDir
());
logger
->
setLogExpire
(
_logExpire
>
0
?
_logExpire
:
ConfigFile
().
logExpire
());
logger
->
setLogFlush
(
_logFlush
);
logger
->
setLogFlush
(
_logFlush
||
ConfigFile
().
logFlush
()
);
logger
->
setLogDebug
(
_logDebug
||
ConfigFile
().
logDebug
());
if
(
!
logger
->
isLoggingToFile
()
&&
ConfigFile
().
automaticLogDir
())
{
logger
->
setupTemporaryFolderLogDir
();
...
...
src/libsync/configfile.cpp
View file @
7033f160
...
...
@@ -76,6 +76,7 @@ static const char automaticLogDirC[] = "logToTemporaryLogDir";
static
const
char
logDirC
[]
=
"logDir"
;
static
const
char
logDebugC
[]
=
"logDebug"
;
static
const
char
logExpireC
[]
=
"logExpire"
;
static
const
char
logFlushC
[]
=
"logFlush"
;
static
const
char
proxyHostC
[]
=
"Proxy/host"
;
static
const
char
proxyTypeC
[]
=
"Proxy/type"
;
...
...
@@ -892,6 +893,18 @@ void ConfigFile::setLogExpire(int hours)
settings
.
setValue
(
QLatin1String
(
logExpireC
),
hours
);
}
bool
ConfigFile
::
logFlush
()
const
{
QSettings
settings
(
configFile
(),
QSettings
::
IniFormat
);
return
settings
.
value
(
QLatin1String
(
logFlushC
),
false
).
toBool
();
}
void
ConfigFile
::
setLogFlush
(
bool
enabled
)
{
QSettings
settings
(
configFile
(),
QSettings
::
IniFormat
);
settings
.
setValue
(
QLatin1String
(
logFlushC
),
enabled
);
}
QString
ConfigFile
::
certificatePath
()
const
{
return
retrieveData
(
QString
(),
QLatin1String
(
certPath
)).
toString
();
...
...
src/libsync/configfile.h
View file @
7033f160
...
...
@@ -101,6 +101,9 @@ public:
int
logExpire
()
const
;
void
setLogExpire
(
int
hours
);
bool
logFlush
()
const
;
void
setLogFlush
(
bool
enabled
);
// proxy settings
void
setProxyType
(
int
proxyType
,
const
QString
&
host
=
QString
(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment