bb-plane-fork/packages/logger
Aaron Heckmann 57479f4554
fix: lint (#7433)
* chore: fix lint

* fix: constants check:lint command

* chore(lint): permit unused vars which begin w/ _

* chore: rm dead code

* fix(lint): more lint fixes to constants pkg

* fix(lint): lint the live server

- fix lint issues

* chore: improve clean script

* fix(lint): more lint

* chore: set live server process title

* chore(deps): update to turbo@2.5.5

* chore(live): target node22

* fix(dev): add missing ui pkg dependency

* fix(dev): lint decorators

* fix(dev): lint space app

* fix(dev): address lint issues in types pkg

* fix(dev): lint editor pkg

* chore(dev): moar lint

* fix(dev): live server exit code

* chore: address PR feedback

* fix(lint): better TPageExtended type

* chore: refactor

* chore: revert most live server changes

* fix: few more lint issues

* chore: enable ci checks

Ensure we can build + confirm that lint is not getting worse.

* chore: address PR feedback

* fix: web lint warning added to package.json

* fix: ci:lint command

---------

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
2025-07-25 01:44:51 +05:30
..
src fix: lint (#7433) 2025-07-25 01:44:51 +05:30
.eslintignore chore: Add logger package for node server side apps (#6188) 2024-12-13 14:32:56 +05:30
.eslintrc.js feat: adding build process to logger package using tsup #7210 2025-06-13 01:50:44 +05:30
.prettierrc chore: Add logger package for node server side apps (#6188) 2024-12-13 14:32:56 +05:30
package.json fix: lint (#7433) 2025-07-25 01:44:51 +05:30
README.md chore: format files using prettier (#7364) 2025-07-08 20:41:11 +05:30
tsconfig.json chore: Add logger package for node server side apps (#6188) 2024-12-13 14:32:56 +05:30
tsup.config.ts fix: update tsup build packages (#7438) 2025-07-18 15:04:31 +05:30

Logger Package

This package provides a logger and a request logger utility built using Winston. It offers customizable log levels using env and supports structured logging for general application logs and HTTP requests.

Features.

  • Dynamic log level configuration using env.
  • Pre-configured winston logger for general usage (logger).
  • Request logger middleware that logs incoming request

Usage

Adding as a package

Add this package as a dependency in package.json

dependency: {
    ...
    @plane/logger":"*",
    ...
}

Importing the Logger

import { logger, requestLogger } from "@plane/logger";

Usage

logger: General Logger

Use this for general application logs.

logger.info("This is an info log");
logger.warn("This is a warning");
logger.error("This is an error");

requestLogger: Request Logger Middleware

Use this as a middleware for incoming requests

const app = express();
app.use(requestLogger);

Available Log Levels

  • error
  • warn
  • info (default)
  • http
  • verbose
  • debug
  • silly

Log file

  • Log files are stored in logs folder of current working directory. Error logs are stored in files with format error-%DATE%.log and combined logs are stored with format combined-%DATE%.log.
  • Log files have a 7 day rotation period defined.

Configuration

  • By default, the log level is set to info.
  • You can specify a log level by adding a LOG_LEVEL in .env.