mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 05:25:50 +03:00
Engine: Do not reset the csync log callback in the engine
It is already set in Folder and we don't want to use the Logger in command line clients
This commit is contained in:
parent
45d1567057
commit
26e17f58ef
4 changed files with 9 additions and 17 deletions
|
@ -42,6 +42,15 @@
|
|||
|
||||
namespace Mirall {
|
||||
|
||||
static void csyncLogCatcher(int /*verbosity*/,
|
||||
const char */*function*/,
|
||||
const char *buffer,
|
||||
void */*userdata*/)
|
||||
{
|
||||
Logger::instance()->csyncLog( QString::fromUtf8(buffer) );
|
||||
}
|
||||
|
||||
|
||||
Folder::Folder(const QString &alias, const QString &path, const QString& secondPath, QObject *parent)
|
||||
: QObject(parent)
|
||||
, _path(path)
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "mirall/syncengine.h"
|
||||
#include "mirall/account.h"
|
||||
#include "mirall/theme.h"
|
||||
#include "mirall/logger.h"
|
||||
#include "owncloudpropagator.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
|
@ -43,14 +42,6 @@
|
|||
|
||||
namespace Mirall {
|
||||
|
||||
void csyncLogCatcher(int /*verbosity*/,
|
||||
const char */*function*/,
|
||||
const char *buffer,
|
||||
void */*userdata*/)
|
||||
{
|
||||
Logger::instance()->csyncLog( QString::fromUtf8(buffer) );
|
||||
}
|
||||
|
||||
bool SyncEngine::_syncRunning = false;
|
||||
|
||||
SyncEngine::SyncEngine(CSYNC *ctx, const QString& localPath, const QString& remoteURL, const QString& remotePath, Mirall::SyncJournalDb* journal)
|
||||
|
@ -504,7 +495,6 @@ void SyncEngine::startSync()
|
|||
// }
|
||||
|
||||
// csync_set_auth_callback( _csync_ctx, getauth );
|
||||
csync_set_log_callback( csyncLogCatcher );
|
||||
//csync_set_log_level( 11 ); don't set the loglevel here, it shall be done by folder.cpp or owncloudcmd.cpp
|
||||
int timeout = OwncloudPropagator::httpTimeout();
|
||||
csync_set_module_property(_csync_ctx, "timeout", &timeout);
|
||||
|
|
|
@ -40,11 +40,6 @@ class SyncJournalDb;
|
|||
|
||||
class OwncloudPropagator;
|
||||
|
||||
void OWNCLOUDSYNC_EXPORT csyncLogCatcher(int /*verbosity*/,
|
||||
const char */*function*/,
|
||||
const char *buffer,
|
||||
void */*userdata*/);
|
||||
|
||||
class OWNCLOUDSYNC_EXPORT SyncEngine : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "mirall/syncengine.h"
|
||||
#include "mirall/syncjournaldb.h"
|
||||
#include "mirall/logger.h"
|
||||
#include "csync.h"
|
||||
#include "mirall/clientproxy.h"
|
||||
#include "mirall/account.h"
|
||||
|
@ -169,7 +168,6 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
|
||||
csync_set_log_level(options.silent ? 1 : 11);
|
||||
Logger::instance()->setLogFile("-");
|
||||
|
||||
csync_set_userdata(_csync_ctx, &options);
|
||||
csync_set_auth_callback( _csync_ctx, getauth );
|
||||
|
|
Loading…
Reference in a new issue