MCPcopy
hub / github.com/ys1231/MoveCertificate / getLoggerInfo

Function getLoggerInfo

webdev/src/cert-service.ts:199–210  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

197 * 注意:这个函数只在用户切换到「运行日志」tab 时才会被调用(懒加载)
198 */
199export async function getLoggerInfo(): Promise<string[]> {
200 try {
201 const { errno, stdout } = await exec(`cat '${INSTALL_LOG_PATH}'`) as ExecResult;
202 if (errno === 0) {
203 return String(stdout).trim().split('\n');
204 }
205 return [t('noLog')];
206 } catch (e) {
207 console.error('获取日志失败:', e);
208 return [t('getLogFailed')];
209 }
210}
211
212/**
213 * 获取已安装证书的完整列表(含名称和状态)

Callers 2

loadLogTabFunction · 0.85
refreshLogTabFunction · 0.85

Calls 1

tFunction · 0.85

Tested by

no test coverage detected