Small logging refactoring
Most logs are now console.debug Removed "Omnisearch" prefix in (almost) all logs Removed timestamp prefix
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
isFileImage,
|
||||
isFileOffice,
|
||||
isFilePDF,
|
||||
logDebug,
|
||||
logVerbose,
|
||||
removeDiacritics,
|
||||
stripMarkdownCharacters,
|
||||
} from '../tools/utils'
|
||||
@@ -65,7 +65,7 @@ export class DocumentsRepository {
|
||||
if (this.documents.has(path)) {
|
||||
return this.documents.get(path)!
|
||||
}
|
||||
logDebug('Generating IndexedDocument from', path)
|
||||
logVerbose('Generating IndexedDocument from', path)
|
||||
await this.addDocument(path)
|
||||
return this.documents.get(path)!
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { getLinkpath, Notice } from 'obsidian'
|
||||
import type OmnisearchPlugin from '../main'
|
||||
import { logDebug } from '../tools/utils'
|
||||
import { logVerbose } from '../tools/utils'
|
||||
|
||||
export class EmbedsRepository {
|
||||
/** Map<embedded file, notes where the embed is referenced> */
|
||||
@@ -55,7 +55,7 @@ export class EmbedsRepository {
|
||||
}
|
||||
|
||||
public async writeToCache(): Promise<void> {
|
||||
logDebug('Writing embeds to cache')
|
||||
logVerbose('Writing embeds to cache')
|
||||
const database = this.plugin.database
|
||||
const data: { embedded: string; referencedBy: string[] }[] = []
|
||||
for (const [path, embedsList] of this.embeds) {
|
||||
@@ -69,10 +69,10 @@ export class EmbedsRepository {
|
||||
try {
|
||||
const database = this.plugin.database
|
||||
if (!database.embeds) {
|
||||
logDebug('No embeds in cache')
|
||||
logVerbose('No embeds in cache')
|
||||
return
|
||||
}
|
||||
logDebug('Loading embeds from cache')
|
||||
logVerbose('Loading embeds from cache')
|
||||
const embedsArr = await database.embeds.toArray()
|
||||
for (const { embedded: path, referencedBy: embeds } of embedsArr) {
|
||||
for (const embed of embeds) {
|
||||
|
||||
Reference in New Issue
Block a user