@meistrari/logger
v2.1.4
Published
@meistrari/logger
Keywords
Readme
@meistrari/logger
Add environment variables
This library requires 3 environment variables: SERVICE_NAME, SERVICE_VERSION and ENVIRONMENT. Without any of them, it will throw an error and crash the application.
SERVICE_NAME
SERVICE_NAME is a slug-friendly value that represents the name of the service
Use - as word divider. Example: use tela-api instead of tela_api
ENVIRONMENT
ENVIRONMENT should be one of development, staging, forninho or production, any other value will crash the application. Also, this is case sensitive.
When using ENVIRONMENT=development, the logger will output pretty-printed logs to the console.
SERVICE_VERSION
SERVICE_VERSION should change based on the deployed version. This is accomplished with a custom deploy workflow that generates the version for each build. The version is commonly the result of git rev-parse --short HEAD, which returns the short version of the HEAD commit
If your application doesn't have a deploy pipeline yet but you want to instrument it anyway, we recommend using unknown as the value for this variable
