mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-23 16:12:12 +02:00
Update log.d
* Potentially resolve 'Aborting from core/sync/mutex.d(149) Error: pthread_mutex_destroy failed.[1] 44576 IOT instruction (core dumped)' errors
This commit is contained in:
parent
a6e2f778c9
commit
46dfb051fe
|
@ -55,13 +55,13 @@ class LogBuffer {
|
||||||
|
|
||||||
void shutdown() {
|
void shutdown() {
|
||||||
synchronized(bufferLock) {
|
synchronized(bufferLock) {
|
||||||
|
if (!isRunning) return; // Prevent multiple shutdowns
|
||||||
isRunning = false;
|
isRunning = false;
|
||||||
condReady.notify();
|
condReady.notifyAll(); // Wake up all waiting threads
|
||||||
}
|
}
|
||||||
flushThread.join();
|
flushThread.join(); // Wait for the flush thread to finish
|
||||||
flush();
|
flush(); // Perform a final flush to ensure all data is processed
|
||||||
}
|
}
|
||||||
|
|
||||||
shared void logThisMessage(string message, string[] levels = ["info"]) {
|
shared void logThisMessage(string message, string[] levels = ["info"]) {
|
||||||
// Generate the timestamp for this log entry
|
// Generate the timestamp for this log entry
|
||||||
auto timeStamp = leftJustify(Clock.currTime().toString(), 28, '0');
|
auto timeStamp = leftJustify(Clock.currTime().toString(), 28, '0');
|
||||||
|
|
Loading…
Reference in a new issue