A simple logging utility for BeyondJs applications.
npm install @beyond-js/logA simple logging utility for BeyondJs applications.
``bash`
npm install @beyond-js/log
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);
}
`
- 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.
MIT © [BeyondJS]