mirror of
https://github.com/jeffvli/feishin.git
synced 2026-08-08 05:12:57 +02:00
improve app logging
- consolidate electron-log and expand support-oriented logging - consolidate log levels to info / trace only - add system/server diagnostics exporter
This commit is contained in:
@@ -9,6 +9,8 @@ import {
|
||||
import { store } from '../settings';
|
||||
import { orderSearchResults } from './shared';
|
||||
|
||||
import log from '/@/main/logger';
|
||||
|
||||
const SEARCH_URL = 'https://music.163.com/api/search/get';
|
||||
const LYRICS_URL = 'https://music.163.com/api/song/lyric';
|
||||
|
||||
@@ -81,7 +83,7 @@ export async function getLyricsBySongId(songId: string): Promise<null | string>
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('NetEase lyrics request got an error!', e);
|
||||
log.error('NetEase lyrics request got an error!', e);
|
||||
return null;
|
||||
}
|
||||
const enableTranslation = store.get('enableNeteaseTranslation', false) as boolean;
|
||||
@@ -114,7 +116,7 @@ export async function getSearchResults(
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('NetEase search request got an error!', e);
|
||||
log.error('NetEase search request got an error!', e);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user