Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Xilerth/ngx-logger
ngx-logger is a powerful Angular library designed to streamline the implementation of custom logging functionalities within Angular applications. This library empowers developers to seamlessly integrate custom logging solutions tailored to their specific requirements, enabling efficient debugging, monitoring, and analytics
https://github.com/Xilerth/ngx-logger
Last synced: 23 days ago
JSON representation
ngx-logger is a powerful Angular library designed to streamline the implementation of custom logging functionalities within Angular applications. This library empowers developers to seamlessly integrate custom logging solutions tailored to their specific requirements, enabling efficient debugging, monitoring, and analytics
- Host: GitHub
- URL: https://github.com/Xilerth/ngx-logger
- Owner: Xilerth
- Created: 2024-05-09T21:46:09.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-29T08:24:51.000Z (7 months ago)
- Last Synced: 2024-10-13T06:30:57.222Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.56 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-angular - @Xilerth/ngx-logger - This library empowers developers to seamlessly integrate custom logging solutions tailored to their specific requirements, enabling efficient debugging, monitoring, and analytics. (Table of contents / Third Party Components)
- fucking-awesome-angular - @Xilerth/ngx-logger - This library empowers developers to seamlessly integrate custom logging solutions tailored to their specific requirements, enabling efficient debugging, monitoring, and analytics. (Table of contents / Third Party Components)
README
# NGX Logger
## Installation
You can install the ngx-logger package using npm:
`npm install @Xilerth/ngx-logger`## USE
Import the LoggerService in your component or service:```
typescript@Component({
selector: 'app-my-component',
template: 'My Component
',
})
export class MyComponent {
constructor(private loggerService: LoggerService) {}logMessage() {
this.loggerService.log({
log: 'info',
message: 'This is an info message',
});
}
}
```## API
### log(data: Logger)
Logs a message with the specified log type and style.
- `data`: An object containing the following properties:
- `log`: The log type (e.g., 'info', 'warn', 'error', 'log', 'table').
- `message`: The message to log.
- `color`: The color of the message (optional).
- `weight`: The font weight of the message (optional).
- `showTime`: Whether to show the timestamp (optional, default: false).
- `title`: The title of the log message (optional).
- `disabled`: Whether logging is disabled (optional, default: false).## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.