You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Made fs functions work again in cli
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import moment from 'moment';
|
||||
// import fs from 'fs-extra';
|
||||
import { _ } from 'lib/locale.js';
|
||||
import FsDriverDummy from 'lib/fs-driver-dummy.js';
|
||||
|
||||
class Logger {
|
||||
|
||||
@ -10,6 +10,11 @@ class Logger {
|
||||
this.fileAppendQueue_ = []
|
||||
}
|
||||
|
||||
static fsDriver() {
|
||||
if (!Logger.fsDriver_) Logger.fsDriver_ = new FsDriverDummy();
|
||||
return Logger.fsDriver_;
|
||||
}
|
||||
|
||||
setLevel(level) {
|
||||
this.level_ = level;
|
||||
}
|
||||
@ -67,8 +72,7 @@ class Logger {
|
||||
serializedObject = object;
|
||||
}
|
||||
|
||||
// RNFIX: Temporary disabled for React Native
|
||||
// fs.appendFileSync(t.path, line + serializedObject + "\n");
|
||||
Logger.fsDriver().appendFileSync(t.path, line + serializedObject + "\n");
|
||||
|
||||
// this.fileAppendQueue_.push({
|
||||
// path: t.path,
|
||||
|
Reference in New Issue
Block a user