refactor[Logger]: replace console logging with logger service (#8271)
* refactor: replace console logging with logger service across multiple components - Updated various files to utilize the logger service instead of console.log for improved logging consistency and error tracking. - Enhanced logging levels to better categorize messages, including debug and error levels. - Refactored logging in components such as ApiClientFactory, KnowledgeService, and MemoryProcessor to align with the new logging standards. * refactor: update logging level in App component from error to info - Changed the logging level in the App component to provide a more appropriate context for initialization messages, enhancing clarity in the logging output. * refactor(logging): replace console.log with logger service in middleware and update ESLint comments - Updated the logging implementation in the createSimpleLoggingMiddleware function to use logger.debug and logger.error instead of console.log and console.error for improved logging consistency. - Added eslint-disable comments for restricted syntax in preload and useAppInit hooks to suppress warnings.
This commit is contained in:
@@ -156,7 +156,7 @@ class KnowledgeService {
|
||||
}
|
||||
|
||||
public delete = async (_: Electron.IpcMainInvokeEvent, id: string): Promise<void> => {
|
||||
console.log('id', id)
|
||||
logger.debug('delete id', id)
|
||||
const dbPath = path.join(this.storageDir, id)
|
||||
if (fs.existsSync(dbPath)) {
|
||||
fs.rmSync(dbPath, { recursive: true })
|
||||
|
||||
Reference in New Issue
Block a user