
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@tuia/koa-log
Advanced tools
TuiaLogger: 系统日志 - 系统报错等
InnerLogger: 数仓日志 - 接入大数据
yarn add @tuia/koa-log
const KoaLog = require('@tuia/koa-log');
app.use(KoaLog);
/** 全局使用 **/
// debug, info, warn, error
global.TuiaLogger.info('system', 'haha');
// 只能用info
global.InnerLogger.info({
group: 1,
type: 2,
json: {
pageId: 1
}
});
/** 中间件使用 **/
async(ctx, next) => {
// debug, info, warn, error
ctx.TuiaLogger.info('system', 'haha');
// 只能用info
ctx.InnerLogger.info({ // 只能用info
group: 1,
type: 2,
json: {
pageId: 1
}
});
}
项目中的 Dockfile 需要修改 workspace(方便日志包获取应用名)
RUN mkdir /root/duiba-deploy/
ADD ./duiba-deploy /root/duiba-deploy/
WORKDIR /root/duiba-deploy/
#define entry point which will be run first when the container starts up
ENTRYPOINT node server
3.0.0 (2020-09-17) - 升级 log4js 包到 6.x 版本 3.2.0 (2020-09-23) - 去掉日志切割时 compress 压缩配置项
FAQs
We found that @tuia/koa-log demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.