@a11ywatch/log 中文文档教程
@a11ywatch/log
向 a11ywatch 记录器服务发送日志报告
Installation
npm i @a11ywatch/log
const { log, setConfig } = require("@a11ywatch/log");
setConfig({ container: "api" });
// out -> { container } logged in each request
log("saved something to db", {
type: "info",
container: "api",
platform: "chrome"
});
Configure logger endpoint
将环境变量 LOGGER_URL
设置为记录器服务。
Disable log stream
将环境变量 LOGGER_ENABLED
设置为 false。 这将在主机控制台而不是记录器服务上执行日志。
Enable/disable verbose log outputs
将环境变量 LOGGER_VERBOSE
设置为 true
@a11ywatch/log
log reports to a11ywatch logger service
Installation
npm i @a11ywatch/log
const { log, setConfig } = require("@a11ywatch/log");
setConfig({ container: "api" });
// out -> { container } logged in each request
log("saved something to db", {
type: "info",
container: "api",
platform: "chrome"
});
Configure logger endpoint
set the env variable LOGGER_URL
to the logger service.
Disable log stream
set the env variable LOGGER_ENABLED
to false. This will perform logs on the host console instead of logger service.
Enable/disable verbose log outputs
set the env variable LOGGER_VERBOSE
to true
更多
你可能也喜欢
- 433-utils 中文文档教程
- 6502-disasm 中文文档教程
- @0x/contracts-erc20-bridge-sampler 中文文档教程
- @0x77/brain 中文文档教程
- @0xcert/ethereum-erc20-contracts 中文文档教程
- @0xsequence/collectible-lists 中文文档教程
- @2alheure/vue-safe-mail 中文文档教程
- @4geit/rct-date-picker-component 中文文档教程
- @aaa-backend-stack/serverdate 中文文档教程
- @aapokiiso/hsl-congestion-route-repository 中文文档教程