TCDN服务端日志说明

日志文件存储于 TCDN服务端的 /mnt/tcdn/logs/ 路径下

开放API接口

TCDN服务端开放API接口来读取最新日志,可以根据日志文件名及指定最后读取多少行,来读取某个日志文件的最新记录。API文档参考: https://doc.zvo.cn/tcdn/20241107/admin.log.log.json.html

以下是相关日志文件的说明

cacheRefresh_yyyy-MM-dd.log

/mnt/tcdn/logs/cacheRefresh_yyyy-MM-dd.log 为 TCDN系统自带的缓存刷新能力进行自动化刷新翻译缓存时的执行日志。
这个文件是以天来进行存储的,每天都会创建一个日志文件,比如:

  1. cacheRefresh_2024-12-03.log
  2. cacheRefresh_2024-12-04.log

这个文件中每行都是以json格式存储的,同时每行也是一个执行动作。
这个文件中的内容如:

  1. {"sourceUrl":"http://qiye1.wang.market/1101.html","targetLanguage":"korean","result":"success","thread":"thread 2","index":32,"allNumberUrl":43,"time":"14:59:00"}
  2. {"sourceUrl":"http://qiye1.wang.market/1057.html","targetLanguage":"persian","result":"success","thread":"thread 3","index":34,"allNumberUrl":43,"time":"14:59:00"}
  3. {"sourceUrl":"http://qiye1.wang.market/1099.html","targetLanguage":"afrikaans","result":"success","thread":"thread 1","index":33,"allNumberUrl":43,"time":"14:59:01"}
  4. {"sourceUrl":"http://qiye1.wang.market/1101.html","targetLanguage":"tajik","result":"success","thread":"thread 2","index":32,"allNumberUrl":43,"time":"14:59:03"}
  5. {"sourceUrl":"http://qiye1.wang.market/1057.html","targetLanguage":"bhojpuri","result":"success","thread":"thread 3","index":34,"allNumberUrl":43,"time":"14:59:04"}
  6. {"sourceUrl":"http://qiye1.wang.market/1099.html","targetLanguage":"indonesian","result":"success","thread":"thread 1","index":33,"allNumberUrl":43,"time":"14:59:05"}

它是按照时间来排序的,执行完一个动作后就会把这个动作追加到这个文件的末尾。 也就是文件的末尾最后一个日志,是最后一次的动作。
有关每行中的字段及内容说明:

tcdn.log

/mnt/tcdn/logs/tcdn.log 为 tcdn 本身运行的日志,一些运行输出都会输出到这里面。
另外每次tcdn启动时,会自动将这个日志文件清空,重新记录。

htmlTranslate_yyyy-MM-dd.log

所有调用html翻译接口执行的日志记录

jsParse_yyyy-MM-dd.log

所有调用 JS引擎接口执行的日志记录