Skip to content

implemented multiple high impact improvements#1

Merged
Ciscode-Admin merged 1 commit intomasterfrom
general-improvements
Feb 20, 2026
Merged

implemented multiple high impact improvements#1
Ciscode-Admin merged 1 commit intomasterfrom
general-improvements

Conversation

@y-aithnini
Copy link
Contributor

@y-aithnini y-aithnini commented Feb 20, 2026

Summary

  • What does this PR change?

Why

  • Why is this change needed?

Checklist

  • Added/updated tests (if behavior changed)
  • npm run lint passes
  • npm run typecheck passes
  • npm test passes
  • npm run build passes
  • Added a changeset (npx changeset) if this affects consumers

Notes

  • Anything reviewers should pay attention to?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive logging enhancements to the @ciscode/logging-kit package, introducing production-ready features for security, performance monitoring, and log volume management. The changes significantly expand the library's capabilities while maintaining backward compatibility.

Changes:

  • Added log masking/redaction to automatically hide sensitive fields like passwords, tokens, and API keys
  • Implemented log sampling for debug/verbose logs to reduce volume in production while preserving critical logs
  • Enhanced error stack parsing with structured output and automatic filtering of node_modules frames
  • Added request/response body logging with size limits and truncation support
  • Integrated performance metrics tracking with slow request detection

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/core/masking.ts New module implementing automatic sensitive field masking with configurable patterns
src/core/sampling.ts New module for deterministic log sampling with statistics tracking
src/core/error-parser.ts New module for parsing and formatting error stack traces
src/core/config.ts Extended configuration with new settings for masking, sampling, performance, and body logging
src/core/types.ts Added new configuration fields to LoggingConfig interface
src/core/index.ts Exported new modules for public API
src/infra/logger.factory.ts Integrated masking and sampling into WinstonLogger implementation
src/nest/module.ts Added LOGGING_CONFIG provider for dependency injection
src/nest/interceptor.ts Enhanced with body logging, performance metrics, and improved error handling
src/nest/constants.ts Added LOGGING_CONFIG injection token
test/masking.test.ts Comprehensive tests for masking functionality
test/sampling.test.ts Comprehensive tests for sampling behavior
test/error-parser.test.ts Comprehensive tests for error parsing
test/transports.test.ts Updated to use buildConfig() pattern consistently
test/interceptor.test.ts Updated to test new interceptor features
.env.example Documented all new configuration options with examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Ciscode-Admin Ciscode-Admin merged commit 4780cb5 into master Feb 20, 2026
5 checks passed
@Ciscode-Admin Ciscode-Admin deleted the general-improvements branch February 20, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants