feat: Automatic plaintext backup option in Preferences > Backups will backup your notes and tags into plaintext, unencrypted folders on your computer. In addition, automatic encrypted text backups preference management has moved from the top-level menu in the desktop app to Preferences > Backups. (#2322)
This commit is contained in:
21
packages/desktop/app/Logging.ts
Normal file
21
packages/desktop/app/Logging.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { isDev } from './javascripts/Main/Utils/Utils'
|
||||
import { log as utilsLog } from '@standardnotes/utils'
|
||||
|
||||
export const isDevMode = isDev()
|
||||
|
||||
export enum LoggingDomain {
|
||||
Backups,
|
||||
}
|
||||
|
||||
const LoggingStatus: Record<LoggingDomain, boolean> = {
|
||||
[LoggingDomain.Backups]: true,
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function log(domain: LoggingDomain, ...args: any[]): void {
|
||||
if (!isDevMode || !LoggingStatus[domain]) {
|
||||
return
|
||||
}
|
||||
|
||||
utilsLog(LoggingDomain[domain], ...args)
|
||||
}
|
||||
Reference in New Issue
Block a user