@5k-rewrite/logger 中文文档教程
Logger
项目共享的简单自定义记录器
Usage
import { info, error, success } from "@5k-rewrite/logger";
info("MARKER 1", { a: 1, b: 2 });
success("MARKER 2", { c: 3, d: 4 });
const func1 = () => {
try {
throw new Error("TEST");
} catch (e) {
error("MARKER 3", { val: 1 }, e);
}
};
func1();
这将记录输出:
跨5k
Maintainers & Contributors
个 有关维护和发布的信息。
Logger
Simple custom logger to be shared across 5k projects
Usage
import { info, error, success } from "@5k-rewrite/logger";
info("MARKER 1", { a: 1, b: 2 });
success("MARKER 2", { c: 3, d: 4 });
const func1 = () => {
try {
throw new Error("TEST");
} catch (e) {
error("MARKER 3", { val: 1 }, e);
}
};
func1();
This would log the output:
Maintainers & Contributors
See CONTRIBUTING.md
for more information on maintenance and publishing.