Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Latest commit

 

History

History
61 lines (46 loc) · 1.51 KB

readme.md

File metadata and controls

61 lines (46 loc) · 1.51 KB

Catalyst server log configuration

The follow diagram explains how our catalyst server manages logs

threads-diagram drawio

Pino-pretty logs for development mode:

install pino-pretty as a development dependency.

npm install --save-dev pino-pretty

manifest.json

    "hapi-pino": {
        "plugin": "require:hapi-pino",
        "options": {
            "$filter": "env.NODE_ENV",
            "$default": {},
            "development": {
                "transport": {
                    "target": "pino-pretty",
                    "options": {
                        "colorize": true,
                        "translateTime": true
                    }
                }
            }      
        }
    }

pass the NODE_ENV as following:

NODE_ENV=development node ./examples/simple/index.js

Pino/file transport logs to stdout or file for production.

    "transport": {
        "targets": [
            {
                "target": "pino/file",
                "options": {
                    "destination": 1
                }
            }
        ]
    }

node js profile review

clinic doctor --autocannon [ /items ] -- node --max-http-header-size=32768 ./examples/simple/index.js | ./node_modules/.bin/pino-pretty --config=./examples/simple/.pino-prettyrc