Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thanhhoajs/logger
Logger for @thanhhoajs
https://github.com/thanhhoajs/logger
logger thanhhoajs
Last synced: 2 months ago
JSON representation
Logger for @thanhhoajs
- Host: GitHub
- URL: https://github.com/thanhhoajs/logger
- Owner: thanhhoajs
- License: mit
- Created: 2024-07-06T09:58:10.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-10-25T02:40:39.000Z (3 months ago)
- Last Synced: 2024-11-15T22:43:02.441Z (3 months ago)
- Topics: logger, thanhhoajs
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@thanhhoajs/logger
- Size: 24.4 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @thanhhoajs/logger
A powerful and flexible logger designed specifically for the @thanhhoajs ecosystem, optimized for high performance with Bun and TypeScript.
## Features
- ๐ High Performance: Optimized to work blazingly fast with the Bun runtime.
- ๐จ Rich Colors: Supports logging with various colors for easy differentiation of log levels.
- ๐ TypeScript Ready: Fully written in TypeScript, providing complete type definitions.
- ๐ง Easily Customizable: Flexible for configuration and extension.
- ๐งช Thoroughly Tested: Includes a comprehensive test suite to ensure reliability.## Installation
```bash
bun add @thanhhoajs/logger
```## Usage
```typescript
import { Logger } from '@thanhhoajs/logger';const logger = Logger.get('EXAMPLE');
logger.info('Application has started');
logger.warn('This is a warning');
logger.error('An error occurred!');
logger.debug('Debug information');
logger.verbose('Detailed information');
logger.success('Operation successful');
```## API Overview
- `info(message: string)`: Log general information
- `warn(message: string)`: Log warnings
- `error(message: string)`: Log errors
- `debug(message: string)`: Log debug information
- `verbose(message: string)`: Log detailed information
- `success(message: string)`: Log success messages## Author
Nguyen Nhu Khanh
## License
[MIT License](https://github.com/thanhhoajs/websocket?tab=MIT-1-ov-file)