https://github.com/beyondjs/log
A simple and lightweight logging utility for BeyondJS applications. This package provides an easy-to-use function for logging messages and errors, enhancing debugging and error tracking in Beyond.js projects. Ideal for developers looking for a straightforward logging solution in their BeyondJS ecosystem.
https://github.com/beyondjs/log
Last synced: 5 months ago
JSON representation
A simple and lightweight logging utility for BeyondJS applications. This package provides an easy-to-use function for logging messages and errors, enhancing debugging and error tracking in Beyond.js projects. Ideal for developers looking for a straightforward logging solution in their BeyondJS ecosystem.
- Host: GitHub
- URL: https://github.com/beyondjs/log
- Owner: beyondjs
- License: mit
- Created: 2024-09-12T19:39:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-13T23:02:51.000Z (almost 2 years ago)
- Last Synced: 2025-11-23T17:16:08.647Z (7 months ago)
- Language: Dockerfile
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @beyond-js/log
A simple logging utility for BeyondJs applications.
## Installation
```bash
npm install @beyond-js/log
```
## Usage
This package provides a simple logging function that can be used to log messages and errors in your Beyond.js
applications.
```javascript
const log = require('@beyond-js/log');
// Log a simple message
log('Hello, world!');
// Log a message with an error
try {
// Some code that might throw an error
} catch (error) {
log('An error occurred', error);
}
```
## API
### `log(message, [error])`
- `message` (string): The message to log.
- `error` (Error, optional): An error object to log along with the message.
This function logs the provided message to the console. If an error object is provided, it will also log the error stack
trace.
## License
MIT © [[BeyondJS](https://beyondjs.com)]