https://github.com/ljlm0402/pinia-plugin-logger
π Logger Plugin for Pinia
https://github.com/ljlm0402/pinia-plugin-logger
logger pinia pinia-plugin vuejs
Last synced: 7 months ago
JSON representation
π Logger Plugin for Pinia
- Host: GitHub
- URL: https://github.com/ljlm0402/pinia-plugin-logger
- Owner: ljlm0402
- License: mit
- Created: 2023-04-12T00:38:35.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-26T23:41:32.000Z (7 months ago)
- Last Synced: 2025-02-27T00:28:36.497Z (7 months ago)
- Topics: logger, pinia, pinia-plugin, vuejs
- Language: TypeScript
- Homepage: https://npm.im/pinia-plugin-logger
- Size: 324 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
π Logger Plugin for [Pinia](https://pinia.vuejs.org/)
## πΉGuide
### Install
```js
$ npm install --save pinia-plugin-logger
```### Usage
```js
import { createPinia } from "pinia";
import piniaPluginLogger from "pinia-plugin-logger";const pinia = createPinia();
const logger = piniaPluginLogger({
activate: true, // Activate the logger
expanded: true, // Expand the console group
store: true, // Show the store name in the console
timestamp: true, // Show the time of the action in the console
errors: true, // Show error the console
include: [], // If defined, only the actions in this list will be logged
exclude: [], // If defined, the work of this list is excluded
});pinia.use(logger);
export default pinia;
```## π¬ Recommended Commit Message
| When | Commit Message |
| :--------------- | :----------------- |
| Add Feature | β¨ Add Feature |
| Fix Bug | π Fix Bug |
| Refactoring Code | π Refactoring Code |
| Install Package | π¦ Install Package |
| Fix Readme | π Fix Readme |
| Update Version | πΌ Update Version |## π³ License
[MIT](LICENSE)