@activescott/diag
另一个日志记录包裹。 这个包真正做的唯一一件事就是为诊断日志定义一个一致的 API。
Usage
您可能需要另一个包或创建 Diag
的派生实现才能使用它。 但是,您可以使用包含的 DiagConsoleImp
直接将日志记录到控制台,这将使迁移路径在未来更容易一些更高级的记录器。
Local Testing
您还可以在发布之前通过全局链接您的模块在您的计算机上测试您的可共享配置。 输入:
yarn link
然后,在您想要使用可共享配置的项目中,输入:
yarn link @activescott/diag
@activescott/diag
Yet another logging package. The only thing this package really is doing is defining a consistent API for diagnostic logging.
Usage
You'll probably need another package or to create a derived implementation of Diag
to use this. However, you can use the included DiagConsoleImp
for simple logging directly to console and it will make the migration path a bit easier to a more advanced logger in the future.
Local Testing
You can also test your shareable config on your computer before publishing by linking your module globally. Type:
yarn link
Then, in your project that wants to use your shareable config, type:
yarn link @activescott/diag