mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-28 10:20:22 +02:00
Update buffered logging
* Update buffered logging
This commit is contained in:
parent
76d7f1129c
commit
c399701ab3
|
@ -836,7 +836,7 @@ class ApplicationConfig {
|
|||
string tempApplicationId = strip(c.front.dup);
|
||||
if (tempApplicationId.empty) {
|
||||
addLogEntry("Invalid value for key in config file: " ~ key);
|
||||
addLogEntry("drive_id in config file cannot be empty - this is a fatal error and must be corrected", ["debug"]);
|
||||
addLogEntry("drive_id in config file cannot be empty - this is a fatal error and must be corrected by removing this entry from your config file", ["debug"]);
|
||||
exit(EXIT_FAILURE);
|
||||
} else {
|
||||
setValueString("drive_id", tempApplicationId);
|
||||
|
|
64
src/log.d
64
src/log.d
|
@ -152,66 +152,4 @@ void enableLogFileOutput(string configuredLogFilePath) {
|
|||
|
||||
void disableGUINotifications(bool userConfigDisableNotifications) {
|
||||
logBuffer.sendGUINotification = userConfigDisableNotifications;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// OLD CODE ... TO REMOVE
|
||||
// ####################################################################################################################
|
||||
|
||||
/**
|
||||
|
||||
void log(T...)(T args) {
|
||||
// old log
|
||||
writeln(args);
|
||||
}
|
||||
|
||||
**/
|
||||
|
||||
void vlog(T...)(T args) {
|
||||
// old verbose
|
||||
//writeln("[VERBOSE] ", args);
|
||||
}
|
||||
|
||||
void vdebug(T...)(T args) {
|
||||
// old log
|
||||
//writeln("[DEBUG] ", args);
|
||||
}
|
||||
|
||||
void vdebugNewLine(T...)(T args) {
|
||||
// old code
|
||||
writeln("old vdebugNewLine");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
void error(T...)(T args) {
|
||||
// old log
|
||||
writeln("old error");
|
||||
}
|
||||
|
||||
void logAndNotify(T...)(T args) {
|
||||
// old log
|
||||
writeln("old logAndNotify");
|
||||
}
|
||||
|
||||
void errorAndNotify(T...)(T args) {
|
||||
// old log
|
||||
writeln("old errorAndNotify");
|
||||
}
|
||||
|
||||
void fileOnly(T...)(T args) {
|
||||
// old code
|
||||
writeln("old fileOnly");
|
||||
}
|
||||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1048,7 +1048,7 @@ void performStandardExitProcess(string scopeCaller = null) {
|
|||
syncEngineInstance = null;
|
||||
} else {
|
||||
addLogEntry("Application exit", ["debug"]);
|
||||
addLogEntry("---------------------------------------------------------------------------------------------------------------------------------------", ["logFileOnly"]);
|
||||
addLogEntry("#######################################################################################################################################", ["logFileOnly"]);
|
||||
// Sleep to allow any final logging output to be printed - this is needed as we are using buffered logging output
|
||||
Thread.sleep(dur!("msecs")(500));
|
||||
// Destroy the shared logging buffer
|
||||
|
|
|
@ -1531,7 +1531,7 @@ class OneDriveApi {
|
|||
SysTime currentTime;
|
||||
|
||||
// Connectivity to Microsoft OneDrive was lost
|
||||
addLogEntry("Internet connectivity to Microsoft OneDrive service has been lost");
|
||||
addLogEntry("Internet connectivity to Microsoft OneDrive service has been lost .. re-trying in the background");
|
||||
|
||||
// what caused the initial curl exception?
|
||||
if (canFind(errorMessage, "Couldn't connect to server on handle")) addLogEntry("Unable to connect to server - HTTPS access blocked?", ["debug"]);
|
||||
|
|
918
src/sync.d
918
src/sync.d
File diff suppressed because it is too large
Load diff
|
@ -313,9 +313,9 @@ bool isValidName(string path) {
|
|||
matched = false;
|
||||
}
|
||||
|
||||
// Determine if the path is at the root level
|
||||
// Determine if the path is at the root level, if yes, check that 'forms' is not the first folder
|
||||
auto segments = pathSplitter(path).array;
|
||||
if (segments.length <= 2 && itemName.toLower() == "forms") { // Convert to lower as OneDrive is not POSIX compliant
|
||||
if (segments.length <= 2 && itemName.toLower() == "forms") { // Convert to lower as OneDrive is not POSIX compliant, easier to compare
|
||||
matched = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue