Skip to content
Snippets Groups Projects
Commit 979acc74 authored by richard.petersen's avatar richard.petersen :sailboat: Committed by julian.baeume
Browse files

Introduce loglevel variable and reduce loglevel for tests

parent 454482cb
No related branches found
No related tags found
No related merge requests found
CACHE_TTL=30000
PORT=8080
MANIFEST_URLS=
LOG_LEVEL=info
......@@ -34,9 +34,13 @@ helm upgrade -i -f manifest-service/values.yaml -f values/develop.yaml manifest-
| Parameter | Description | Default |
|-----------------|---------------------------------|----------|
| `PORT` | Exposed port | `"8080"` |
| `CACHE_TTL` | Vite manifest caching time | `30000` |
| `LOG_LEVEL` | Pino log level | `"info"` |
**kubernetes**
| Parameter | Description | Default |
|----------------|---------------------------------|----------|
| `port` | Exposed port | `"8080"` |
| `cacheTTL` | Vite manifest caching time | `30000` |
| `logLevel` | Pino log level | `"info"` |
......@@ -40,6 +40,8 @@ spec:
env:
- name: CACHE_TTL
value: "{{ .Values.cacheTTL | int }}"
- name: LOG_LEVEL
value: "{{ .Values.logLevel }}"
ports:
- name: http
containerPort: {{ .Values.containerPort | default 8080 }}
......
......@@ -85,3 +85,4 @@ affinity: {}
# service specific configuration
cacheTTL: 30000
logLevel: info
......@@ -9,7 +9,7 @@
"start": "node src/index.js",
"dev": "nodemon index.js | pino-pretty",
"prepare": "husky install",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --no-cache"
"test": "LOG_LEVEL=error NODE_OPTIONS=--experimental-vm-modules jest --no-cache"
},
"author": "Open-Xchange",
"license": "CC-BY-NC-SA-2.5",
......
// Very low overhead Node.js logger. Logs in json use pino-pretty for dev.
import Logger from 'pino'
export const logger = new Logger()
export const logger = new Logger({
level: process.env.LOG_LEVEL
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment