update description
This commit is contained in:
parent
a39dc80699
commit
fed8809fd5
30
package.json
30
package.json
@ -9,21 +9,18 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/ --web)",
|
"test": "(tstest test/ --web)",
|
||||||
"testBrowser": "(parcel ./test/index.html)",
|
"build": "(tsbuild --web)",
|
||||||
"build": "(tsbuild --web)"
|
"buildDocs": "tsdoc"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.24",
|
"@git.zone/tsbuild": "^2.1.66",
|
||||||
"@gitzone/tstest": "^1.0.40",
|
"@git.zone/tstest": "^1.0.77",
|
||||||
"@pushrocks/smartlog": "^2.0.35",
|
"@push.rocks/smartlog": "^3.0.2",
|
||||||
"@pushrocks/tapbundle": "^3.2.7",
|
"@push.rocks/tapbundle": "^5.0.8",
|
||||||
"@types/node": "^14.0.20",
|
"@types/node": "^20.12.12"
|
||||||
"parcel-bundler": "^1.12.4",
|
|
||||||
"tslint": "^6.1.2",
|
|
||||||
"tslint-config-prettier": "^1.18.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartlog-interfaces": "^2.0.20"
|
"@push.rocks/smartlog-interfaces": "^3.0.0"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 chrome versions"
|
"last 1 chrome versions"
|
||||||
@ -51,5 +48,14 @@
|
|||||||
"visual logging",
|
"visual logging",
|
||||||
"smartlog",
|
"smartlog",
|
||||||
"devtools"
|
"devtools"
|
||||||
]
|
],
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://code.foss.global/push.rocks/smartlog-destination-devtools.git"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://code.foss.global/push.rocks/smartlog-destination-devtools/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://code.foss.global/push.rocks/smartlog-destination-devtools",
|
||||||
|
"type": "module"
|
||||||
}
|
}
|
14
readme.md
14
readme.md
@ -12,14 +12,14 @@ This will add `smartlog-destination-devtools` as a dependency to your project an
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
`@push.rocks/smartlog-destination-devtools` provides a seamless way to output beautified log messages directly to your browser's console, making use of the `@pushrocks/smartlog` ecosystem for structured and meaningful logging.
|
`@push.rocks/smartlog-destination-devtools` provides a seamless way to output beautified log messages directly to your browser's console, making use of the `@push.rocks/smartlog` ecosystem for structured and meaningful logging.
|
||||||
|
|
||||||
### Getting Started
|
### Getting Started
|
||||||
|
|
||||||
First, ensure you have `@pushrocks/smartlog` installed in your project. If not, install it alongside `smartlog-destination-devtools`:
|
First, ensure you have `@push.rocks/smartlog` installed in your project. If not, install it alongside `smartlog-destination-devtools`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install @pushrocks/smartlog @push.rocks/smartlog-destination-devtools --save
|
npm install @push.rocks/smartlog @push.rocks/smartlog-destination-devtools --save
|
||||||
```
|
```
|
||||||
|
|
||||||
Now, let's set up the basic usage of `smartlog-destination-devtools` within a TypeScript project.
|
Now, let's set up the basic usage of `smartlog-destination-devtools` within a TypeScript project.
|
||||||
@ -29,7 +29,7 @@ Now, let's set up the basic usage of `smartlog-destination-devtools` within a Ty
|
|||||||
Import the required modules and initialize `Smartlog` and `SmartlogDestinationDevtools`.
|
Import the required modules and initialize `Smartlog` and `SmartlogDestinationDevtools`.
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { Smartlog, ISmartlogOptions, ILogContext } from '@pushrocks/smartlog';
|
import { Smartlog, ISmartlogOptions, ILogContext } from '@push.rocks/smartlog';
|
||||||
import { SmartlogDestinationDevtools } from '@push.rocks/smartlog-destination-devtools';
|
import { SmartlogDestinationDevtools } from '@push.rocks/smartlog-destination-devtools';
|
||||||
|
|
||||||
// Define your log context
|
// Define your log context
|
||||||
@ -75,17 +75,17 @@ smartlogInstance.error('This is an error message', new Error('Something went wro
|
|||||||
|
|
||||||
### Customization
|
### Customization
|
||||||
|
|
||||||
`SmartlogDestinationDevtools` class is designed to automatically handle log messages sent through `@pushrocks/smartlog` and print them to the browser's console in a visually structured and highlighted manner. Currently, it translates different log levels (`info`, `warn`, `error`, `note`, `success`) to different styles in the DevTools console.
|
`SmartlogDestinationDevtools` class is designed to automatically handle log messages sent through `@push.rocks/smartlog` and print them to the browser's console in a visually structured and highlighted manner. Currently, it translates different log levels (`info`, `warn`, `error`, `note`, `success`) to different styles in the DevTools console.
|
||||||
|
|
||||||
Since the core feature of `smartlog-destination-devtools` is to enhance the visual feedback of logs in the development environment, further customization can be achieved by altering the source code of the `handleLog` method within the class to fit your styling needs or by extending the class with your own implementation.
|
Since the core feature of `smartlog-destination-devtools` is to enhance the visual feedback of logs in the development environment, further customization can be achieved by altering the source code of the `handleLog` method within the class to fit your styling needs or by extending the class with your own implementation.
|
||||||
|
|
||||||
### Advanced Usage
|
### Advanced Usage
|
||||||
|
|
||||||
For more advanced scenarios like filtering logs or integrating with other logging systems, refer to the `@pushrocks/smartlog` documentation, as `smartlog-destination-devtools` acts as a destination for the logs managed by `@pushrocks/smartlog`.
|
For more advanced scenarios like filtering logs or integrating with other logging systems, refer to the `@push.rocks/smartlog` documentation, as `smartlog-destination-devtools` acts as a destination for the logs managed by `@push.rocks/smartlog`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
By integrating `@push.rocks/smartlog-destination-devtools`, you're equipped to make your browser-based debugging and logging more effective and visually appealing, leveraging the structured logging capabilities of `@pushrocks/smartlog`.
|
By integrating `@push.rocks/smartlog-destination-devtools`, you're equipped to make your browser-based debugging and logging more effective and visually appealing, leveraging the structured logging capabilities of `@push.rocks/smartlog`.
|
||||||
|
|
||||||
## License and Legal Information
|
## License and Legal Information
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user