CDS pluginCDS plugintypeInstalls into a CAP project and extends the runtime. CAP loads it through cds.requires or the plugin hook.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

@sanjay-sde/cap-js-log-control

A CAP plugin for controlling CDS logger verbosity and OpenTelemetry DiagLogger noise, reducing log clutter so that real errors surface.

Facts

Latestv0.3.0ReleasedLast pushLicenceMIT

Where it sits

Lives in
Provides
TelemetryCAPTelemetrycapabilitySeeing what a running service did — traces across handlers and database calls, metrics, and correlation that survives an async boundary.
Flavors
Node.jsfrom its type
Requires
@sap/cds≥ 7.0.0@sap/cdsartifactThe peer range, as published.

Who is behind it

SanjayBabu SPSanjayBabu SPPersonMaintains this
In the atlas: maintains 1, contributes to 1
@SanjayBabuSP
maintainer

Before choosing this

Conditions

LicenceSAP Developer License Agreement 3.2 CAP§ 1, 2, 3A cds-plugin is used with SAP CAP materials, or an artifact is explicitly identified as a CAP plugin or application.
  • § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.
  • § 2 Intellectual Property. The agreement retains SAP's rights in the covered materials and limits making APIs, tools or software available to third parties, while preserving ownership of customer applications subject to SAP's underlying rights.
  • § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.
SAP Developer License Agreement 3.2 CAP →

What it declares

Every artifact

Type
CDS plugin
Origin
Independently maintained

As a CDS plugin

Declared for
>=7.0.0
Distributed through
npm

Connections1

Install

npm add @sanjay-sde/cap-js-log-control

Derived from the package name. No recipe recorded; the README has the configuration.

README

quoted from SanjayBabuSP/cap-js-log-control under MIT, read
SanjayBabuSP/cap-js-log-control/README.mdOn GitHub

cap-js-log-control

CAP plugin for controlling CDS logger verbosity and OpenTelemetry DiagLogger noise — reduce log clutter, surface real errors.

Problem

SAP CAP applications on Cloud Foundry generate excessive log noise that buries real errors:

  • odata logger — logs every incoming OData request with full HTTP headers JSON blobs
  • remote logger — logs every outgoing remote service call with full headers
  • OpenTelemetry DiagLogger — @cap-js/telemetry OTLP gRPC exporters emit diagnostic logs that bypass cds.log entirely

Before:

STDOUT {"level":"info","logger":"odata","msg":"POST /assets/$batch",...<3KB of headers>}
STDOUT {"level":"debug","logger":"remote","msg":"GET <api>/... Executing via @sap-cloud-sdk",...}
STDERR ExporterError: Export... failed  [repeated 50x from OTel gRPC]
STDERR Error: The request has no query  ← REAL error, buried

After:

STDERR Error: The request has no query  ← now visible immediately

Installation

npm install cap-js-log-control

CAP auto-discovers the plugin via cds-plugin.js — no code changes needed.

Configuration

Quick Start (zero config)

The plugin works out of the box with sensible defaults:

  • odata → warn
  • remote → warn
  • telemetry → warn
  • OpenTelemetry DiagLogger → ERROR
Plugin Config (cds.logControl)

Add to package.json or .cdsrc.json:

{
  "cds": {
    "logControl": {
      "enabled": true,
      "otelDiagLevel": "ERROR",
      "levels": {
        "odata": "warn",
        "remote": "warn",
        "telemetry": "warn"
      }
    }
  }
}
Native CDS Log Levels (also supported)

You can also use the standard CDS log.levels format — the plugin reads both:

{
  "cds": {
    "[development]": {
      "log": {
        "levels": {
          "odata": "error",
          "remote": "error"
        }
      }
    }
  }
}

Priority: cds.logControl.levels overrides cds.log.levels when both are set for the same logger.

Per-Profile Overrides

Use CAP profiles to tune log levels per environment:

{
  "cds": {
    "logControl": {
      "enabled": true,
      "levels": {
        "odata": "warn",
        "remote": "warn"
      }
    },
    "[development]": {
      "logControl": {
        "levels": {
          "odata": "error",
          "remote": "error"
        }
      }
    },
    "[production]": {
      "logControl": {
        "otelDiagLevel": "WARN"
      }
    }
  }
}
Disable the Plugin
{
  "cds": {
    "logControl": {
      "enabled": false
    }
  }
}

Config Reference

OptionTypeDefaultDescription
logControl.enabledbooleantrueMaster switch — set false to disable all log control
logControl.levelsRecord<string, string>{ odata: 'warn', remote: 'warn', telemetry: 'warn' }Map of CDS logger names to log levels
logControl.otelDiagLevelstring'ERROR'OpenTelemetry DiagLogger level
CDS Log Levels

silent | error | warn | info | debug | verbose | silly

OTel DiagLogger Levels

NONE | ERROR | WARN | INFO | DEBUG | VERBOSE | ALL

How It Works

  1. Runs at module load time — not inside a lifecycle hook — because logger noise starts during CDS bootstrap before cds.once('served') fires.
  2. Controls CDS loggers — calls cds.log(name).setLevel(level) for each configured logger.
  3. Controls OTel DiagLogger — sets diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ERROR) to suppress OTLP exporter retry chatter.
  4. Does NOT redirect stdout/stderr — all logs still flow to CF Loggregator for cloud logging.
  5. Does NOT patch console.log — only reduces log generation at the source.

What This Plugin Does NOT Do

  • Does NOT redirect or wrap process.stdout / process.stderr
  • Does NOT patch console.log / console.error
  • Does NOT affect cloud logging — all generated logs still flow to CF Loggregator
  • Does NOT disable @cap-js/telemetry or OTLP exporters — only reduces their diagnostic output

Development

npm install
npm run build
npm test

License

Apache-2.0

MIT, read

History

Latest

v0.3.0

Features 1

Notes
Features
  • rename package to @sanjay-sde/cap-js-log-control (bac2e94)
  1. v0.2.0

    Features 1

    Notes
    Features
    • initial commit — cap-js-log-control cds plugin with GitHub Actions (6e17145)
0downloads per week, npm
Weekly downloads for @sanjay-sde/cap-js-log-control26 complete calendar weeks from 2026-04-27 to 2026-10-25; the latest total is 0.27 Apr – 3 May: 04 May – 10 May: 011 May – 17 May: 018 May – 24 May: 22125 May – 31 May: 341 Jun – 7 Jun: 48 Jun – 14 Jun: 615 Jun – 21 Jun: 322 Jun – 28 Jun: 1529 Jun – 5 Jul: 156 Jul – 12 Jul: 613 Jul – 19 Jul: 420 Jul – 26 Jul: 627 Jul – 2 Aug: 13 Aug – 9 Aug: 410 Aug – 16 Aug: 1117 Aug – 23 Aug: 524 Aug – 30 Aug: 631 Aug – 6 Sept: 37 Sept – 13 Sept: 514 Sept – 20 Sept: 321 Sept – 27 Sept: 128 Sept – 4 Oct: 15 Oct – 11 Oct: 112 Oct – 18 Oct: 019 Oct – 25 Oct: 0
Telemetry
  1. abap-metrics-providerExposes ABAP stack metrics to a monitoring toolfrom ABAP
  2. admin-cockpitUsage, error and response-time monitor for abap2UI5from ABAP
  3. SAP Cloud LoggingOpenSearch-based store for logs, metrics and tracesfrom BTP/BAIP
  4. Agent Activation for Dynatrace Service for SAP BTPInjects the Dynatrace agent into Java applications on SAP BTPfrom BTP/BAIP
  5. SAP Monitoring Service for SAP BTPMetrics, availability checks and alerts for apps in Neo regionsfrom BTP/BAIP
  6. com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versionsfrom CAP
  7. @cap-js-community/business-metricsBusiness-level metrics from CDS annotations via @cap-js/telemetryfrom CAP
  8. @cap-js/telemetryOpenTelemetry instrumentation for CAP servicesfrom CAP
  9. cds-cachingCAP caching plugin for query results and remote service responsesfrom CAP
  10. cap-mcp-guardPolicy enforcement and field masking for MCP-enabled CAP appsfrom CAP
  11. abap-opentelemetryOTLP serialisation of traces, metrics and logs in ABAPfrom ABAP
  12. abap-prometheusPrometheus client for ABAP, installed with abapGitfrom ABAP
  13. @sap/e2e-traceSAP Passport handling for Node.js componentsfrom BTP/BAIP
  14. @sap-ux/telemetryLibrary for sending usage telemetry datafrom CAP
  15. @saptools/cf-metricsRead-only query tool for metrics in SAP Cloud Loggingfrom BTP/BAIP
  16. @saptools/cf-otelRead-only query tool for OpenTelemetry spans in SAP Cloud Loggingfrom BTP/BAIP
  17. cap-ui-telemetryUI5 frontend performance and error capture for CAPfrom CAP
  18. opentelemetry-cdsOpenTelemetry support for the CDS Node.js runtimefrom CAP

Details

Sources5
npm registrydiscovered herechecked
The discovery passdiscovered herechecked
npm registry, @sanjay-sde/cap-js-log-controlversion, releases, installschecked
github.com/git+https://github.com/SanjayBabuSP/cap-js-log-control.gittree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
declared for>=7.0.0
latestv0.3.0
first release
releases and cadence2
discovered vianpm registry, The discovery pass
first seen in the atlas
ecosystem and domaincap, operations-and-runtime
History in the atlas2
  1. what it does for telemetry
  2. First seen.
For your agent
Ref
artifact:sanjay-sde-cap-js-log-control
JSON
/artifacts/sanjay-sde-cap-js-log-control.json
MCP
Connecting an agent