metalmental-logger
v0.1.6
Published
A simple logger library that outputs the file names and line numbers of TypeScript code before it is compiled to JavaScript
Downloads
87
Maintainers
Readme
MetalMental Logger
MetalMental Loggerは、JavaScriptにコンパイルされる前のTypeScriptコードのログを出力するライブラリです https://www.npmjs.com/package/metalmental-logger
特徴
- 簡単な設定
- 複数のログレベル(DEBUG、INFO、ERROR)
- TypeScriptコードのログをターミナルに出力
インストール
npm install metalmental-logger
使い方
// 任意のファイル (例: app.ts)
import { logger } from 'metalmental-logger';
logger.info("INFOログの出力例");
logger.error("ERRORログの出力例");
[2024/09/14 20:03:40.299 GMT+9] [INFO] [app.ts] [8行目] INFOログの出力例
[2024/09/14 20:03:40.299 GMT+9] [ERROR] [app.ts] [9行目] ERRORログの出力例
ライセンス
MITライセンスで提供されています 詳細はLICENSEファイルを参照してください
著者
MetalMental - [email protected]