agentskills.codes
SE

setup-sap-btp-logging

Automates the setup of sap-btp-cloud-logging-client in a project.

Install

mkdir -p .claude/skills/setup-sap-btp-logging && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15557" && unzip -o skill.zip -d .claude/skills/setup-sap-btp-logging && rm skill.zip

Installs to .claude/skills/setup-sap-btp-logging

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Automates the setup of sap-btp-cloud-logging-client in a project.
65 charsno explicit “when” trigger

About this skill

Setup SAP BTP Cloud Logging

This skill helps you integrate the sap-btp-cloud-logging-client into your Node.js/TypeScript project.

Capabilities

  1. Install Dependency: Installs sap-btp-cloud-logging-client.
  2. Add Utility Class: Copies a standard LogUtils class (Singleton) to your project.
  3. Configure Environment: Adds required environment variables to your .env file.

Usage

Run this skill when you want to add cloud logging to a project.

/setup-sap-btp-logging

Steps

  1. Install Package:

    npm install sap-btp-cloud-logging-client
    
  2. Create Utility Class: Copy templates/LogUtils.ts to src/utils/LogUtils.ts (or your preferred location).

    • Note: If using JS, you may need to strip types.
  3. Update .env: Append the following template to .env:

    # SAP BTP Cloud Logging
    BTP_LOGGING_INGEST_ENDPOINT=
    BTP_LOGGING_USERNAME=
    BTP_LOGGING_PASSWORD=
    BTP_LOG_LEVEL=INFO
    BTP_APPLICATION_NAME=
    BTP_SUBACCOUNT_ID=
    # Or use a single Service Key JSON (overrides individual fields above)
    # BTP_LOGGING_SRV_KEY_CRED={"ingest-endpoint":"...","ingest-username":"...","ingest-password":"..."}
    
  4. Add Middleware (Optional): In your express app:

    const { createLogger, middleware } = require('sap-btp-cloud-logging-client');
    const logger = createLogger();
    app.use(middleware(logger, {
      logRequests: true,
      logResponses: true,
      excludePaths: ['/health', '/api/docs/*']
    }));
    

Search skills

Search the agent skills registry