Add none logging level, update readme
This commit is contained in:
1 parent
5c561d87ce
commit
5eb022a3c2
2 files changed
+13
-4
No files matched your search
@@ -3,6 +3,13 @@ class Logger {
|
|||||||
constructor(logLevel) {
|
constructor(logLevel) {
|
||||||
const NO_OP = () => {};
|
const NO_OP = () => {};
|
||||||
|
|
||||||
|
if (logLevel === "none") {
|
||||||
|
this.error = NO_OP;
|
||||||
|
this.warn = NO_OP;
|
||||||
|
this.log = NO_OP;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.error = console.error.bind(console);
|
this.error = console.error.bind(console);
|
||||||
|
|
||||||
if (logLevel === "error") {
|
if (logLevel === "error") {
|
||||||
@@ -14,6 +21,7 @@ class Logger {
|
|||||||
|
|
||||||
if (logLevel === "warn") {
|
if (logLevel === "warn") {
|
||||||
this.log = NO_OP;
|
this.log = NO_OP;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
this.log = console.log.bind(console);
|
this.log = console.log.bind(console);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ Made with [contrib.rocks](https://contrib.rocks).
|
|||||||
|
|
||||||
[](https://star-history.com/#bluewave-labs/bluewave-uptime&Date)
|
[](https://star-history.com/#bluewave-labs/bluewave-uptime&Date)
|
||||||
|
|
||||||
|
|
||||||
Also check other developer and contributor-friendly projects of BlueWave:
|
Also check other developer and contributor-friendly projects of BlueWave:
|
||||||
|
|
||||||
- [BlueWave HRM](https://github.com/bluewave-labs/bluewave-hrm)
|
- [BlueWave HRM](https://github.com/bluewave-labs/bluewave-hrm)
|
||||||
@@ -191,6 +190,7 @@ SYSTEM_EMAIL_PASSWORD=<system_email_password>
|
|||||||
|
|
||||||
```
|
```
|
||||||
VITE_APP_API_BASE_URL="http://localhost:5000/api/v1"
|
VITE_APP_API_BASE_URL="http://localhost:5000/api/v1"
|
||||||
|
VITE_APP_API_LOG_LEVEL="debug"
|
||||||
```
|
```
|
||||||
|
|
||||||
4. In the `Docker` directory run `docker compose up` to run the `docker-compose.yaml` file and start all four images.
|
4. In the `Docker` directory run `docker compose up` to run the `docker-compose.yaml` file and start all four images.
|
||||||
@@ -211,9 +211,10 @@ That's it, the application is ready to use on port 80.
|
|||||||
|
|
||||||
##### Environmental Variables <a id="env-vars-client"></a>
|
##### Environmental Variables <a id="env-vars-client"></a>
|
||||||
|
|
||||||
| ENV Variable Name | Required/Optional | Type | Description | Accepted Values |
|
| ENV Variable Name | Required/Optional | Type | Description | Accepted Values |
|
||||||
| --------------------- | ----------------- | -------- | ------------------ | --------------- |
|
| --------------------- | ----------------- | -------- | ------------------ | ---------------------------------- |
|
||||||
| VITE_APP_API_BASE_URL | Required | `string` | Base URL of server | {host}/api/v1 |
|
| VITE_APP_API_BASE_URL | Required | `string` | Base URL of server | {host}/api/v1 |
|
||||||
|
| VITE_APP_LOG_LEVEL | Optional | `string` | Log level | `"none"`\|`"error"` \| `"warn"` \| |
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user