4.0.0 • Published 2 years ago

@sweet-milktea/server-log v4.0.0

Weekly downloads
7
License
-
Repository
github
Last release
2 years ago

@sweet-milktea/server-log

生产环境下的日志扩展。

使用方法

import serverLog from '@sweet-milktea/server-log';

const { accessLogger, logger } = serverLog(type, {
  pm2,
  basicPath,
  url
});

参数

  • type { 'file' | 'http' } : 日志类型,本地file 或 远程接口http
  • options { object } : 配置项。
    • pm2 { boolean } : 服务是否在pm2状态下运行。
    • basicPath { string } : .logs文件夹在本地的目录。
    • url { string } : 日志的远程接口。

返回值

  • accessLogger { Function } : Koa日志中间件。
  • logger { object } : 创建日志方法。方法参考log4js
4.0.0

2 years ago

3.0.0-beta.0

3 years ago

3.0.0

3 years ago

0.6.6

5 years ago

0.3.9

5 years ago

0.3.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago