Amplication
Platform
Solutions
Learn
Star Us 12.7K
Log In to Amplication

Contact us

  • contact@amplication.org
Try Overcut.ai
  • Home /
  • Plugins /
  • JSON Logger
plugin logo
JSON Logger
Install Plugin

plugin-logger-json

NPM Downloads

Purpose

This plugins allows to log in a JSON format rather than less common string NestJS format.

Configuration

You can configure the logger plugin in the following ways:

  • logLevel: The level of messages to log. Possible values are 'fatal' , 'error' , 'warn' , 'info' , 'debug' , 'trace' or 'silent'.
  • additionalLogProperties: A dictionary of the extra properties that you want to add with each log messages.
  • logRequest: A boolean value to enable or disable logging of request and response. Default is false.
  • sensitiveKeys: An array of keys that you want to redact from the request and response logs. Default is [].
  • pinoPretty: A boolean value to enable or disable pretty printing of the logs. Default is false.

Examples:

{
  "logLevel": "info",
  "additionalLogProperties": {
    "someKey": "someValue",
    "project": "A",
    "team": "di"
  }
}
{
  "logRequest": true,
  "sensitiveKeys": ["req.headers.authorization"],
}

Usage

  1. Enable the plugin in your Amplication app.

By enabling this plugin, a new folder named logger is added to your server/src/ directory which contains all the files for the logger configuration.

Scripts

build

Running npm run build will bundle your plugin with Webpack for production.

dev

Running npm run dev will watch your plugin's source code and automatically bundle it with every change.

Details
npm
@amplication/plugin-logger-json
github
https://github.com/amplication/plugins/tree/main/plugins/logger-json
Installs
12
Categories
Logging
Documentation
https://github.com/amplication/plugins/tree/main/plugins/logger-json

Get started with Amplication and JSON Logger

Start NowBook a demo

Platform

Live TemplatesPluginsJovu

Solutions

Enhance platform engineeringBuild new servicesBuild APIs on existing DBModernize applications

Customers

IT ServicesRetailHealthcareManufacturingCustomer stories

Use Amplication

Get started Custom pluginsCustom codeSync with GitEvent-driven architectureBreak the monolith

Resources

DocsCustomer storiesPlugins catalogDiscord communityGitHubBlog

About

CompanyContact us

©2025 amplication

Privacy PolicyTerms & Conditions
Follow usTwitter IconYouTube Icon