From f7f0a7fbf53eb2050f2eeb23fa711c2cfe9a03f8 Mon Sep 17 00:00:00 2001 From: f-w Date: Sun, 15 Dec 2024 13:44:06 -0800 Subject: [PATCH] updated docs --- docs/.vuepress/config.js | 1 + docs/docs/api/overview.md | 2 +- docs/docs/config/logging.md | 24 ++++++++++++++++++++ docs/docs/config/queue.md | 1 - docs/docs/meta/acknowledgments.md | 2 ++ docs/docs/miscellaneous/disaster-recovery.md | 7 ++++++ package.json | 2 +- 7 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 docs/docs/config/logging.md diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index f02abb460..4d64fced0 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -136,6 +136,7 @@ export default defineUserConfig({ '/docs/config-oidc/', '/docs/config-certificates/', '/docs/config-queue/', + '/docs/config-logging/', ], }, { diff --git a/docs/docs/api/overview.md b/docs/docs/api/overview.md index fba5bc472..0d542ebdc 100644 --- a/docs/docs/api/overview.md +++ b/docs/docs/api/overview.md @@ -1,6 +1,6 @@ --- permalink: /docs/api-overview/ -prev: /docs/config-queue/ +prev: /docs/config-logging/ --- # API Overview diff --git a/docs/docs/config/logging.md b/docs/docs/config/logging.md new file mode 100644 index 000000000..2199e91b1 --- /dev/null +++ b/docs/docs/config/logging.md @@ -0,0 +1,24 @@ +--- +permalink: /docs/config-logging/ +next: /docs/api-overview/ +--- + +# Logging + +Besides request logging using morgan [middleware](middleware.md), _NotifyBC_ also generates application log. Application log has following levels in descending severities + +1. fatal +2. error +3. warn +4. log +5. debug +6. verbose + +By default the first 4 logging levels are output to console. To override the defaults, set the `loggingLevels` config in _src/config.local.js_. For example, to include debug logs + +```js +module.exports = { + // ... + loggingLevels: ['fatal', 'error', 'warn', 'log', 'debug'], +}; +``` diff --git a/docs/docs/config/queue.md b/docs/docs/config/queue.md index 31db01abb..c5ff2a852 100644 --- a/docs/docs/config/queue.md +++ b/docs/docs/config/queue.md @@ -1,6 +1,5 @@ --- permalink: /docs/config-queue/ -next: /docs/api-overview/ --- # Queue diff --git a/docs/docs/meta/acknowledgments.md b/docs/docs/meta/acknowledgments.md index ad8f456e8..089a27075 100644 --- a/docs/docs/meta/acknowledgments.md +++ b/docs/docs/meta/acknowledgments.md @@ -12,6 +12,8 @@ few services. Credit goes to their contributors. Notably - [MongoDB](https://www.mongodb.com/) - [NodeMailer](https://nodemailer.com/) - [JMESPath](https://jmespath.org/) +- [BullMQ](https://docs.bullmq.io/) +- [Redis](https://redis.io/) - [Vue](https://vuejs.org/) - [Vuetify](https://vuetifyjs.com/) - [iframe-resizer](https://iframe-resizer.com/) diff --git a/docs/docs/miscellaneous/disaster-recovery.md b/docs/docs/miscellaneous/disaster-recovery.md index 330e8f87c..e5f7b298d 100644 --- a/docs/docs/miscellaneous/disaster-recovery.md +++ b/docs/docs/miscellaneous/disaster-recovery.md @@ -19,3 +19,10 @@ Under disastrous circumstances, however, entire HA cluster may fail. Recovery sh 1. MongoDB 2. Redis 3. API server + +Notes + +- MongoDB holds persistent data. When recovering MongoDB, data needs to be recovered. If data is corrupted, restore from backup. +- If MongoDB is the only failed component, after recovery, the other two components don't need to be restarted. +- Redis doesn't hold persistent data. When recovering Redis, data doesn't need to be recovered. +- After recovering Redis, API server needs to be restarted. diff --git a/package.json b/package.json index 633503328..ac5f56f8f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notify-bc", - "version": "5.1.2", + "version": "6.0.0", "dbSchemaVersion": "0.9.0", "description": "A versatile notification API server", "author": "f-w",