https://github.com/phenomnomnominal/debug
debug is a super lazy way to add debug logging!
https://github.com/phenomnomnominal/debug
Last synced: 15 days ago
JSON representation
debug is a super lazy way to add debug logging!
- Host: GitHub
- URL: https://github.com/phenomnomnominal/debug
- Owner: phenomnomnominal
- License: mit
- Created: 2020-10-20T12:13:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-05T19:50:25.000Z (over 4 years ago)
- Last Synced: 2025-04-18T09:02:59.487Z (about 1 month ago)
- Language: TypeScript
- Size: 41 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [@phenomnomnominal/debug](https://github.com/phenomnomnominal/debug/)
[](https://www.npmjs.com/package/@phenomnomnominal/debug)
**`debug`** is a super lazy way to add debug logging!
## Usage
```typescript
import { debug } from '@phenomnomnominal/debug';debug({ enabled: true });
```## Options
```typescript
export type DebugOptions = {
enabled: boolean; // Enable debug logging
time: boolean; // Enable function execution time logging
values: boolean; // Enable argument and return value logging
logPath: string; // Disable stdout logging and print to file at this path
header: string; // Header name for the initial debug log
include: DebugIncludes; // RegExp to match node_modules paths that should be included in the logs
ignore: DebugIgnores; // RegExp to match local paths that should be ignored from the logs
logger: DebugLogger; // Custom logger implementation (Maybe you want to send it via HTTP 🤷♂️)
};
```