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.zipInstalls 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
- Install Dependency: Installs
sap-btp-cloud-logging-client. - Add Utility Class: Copies a standard
LogUtilsclass (Singleton) to your project. - Configure Environment: Adds required environment variables to your
.envfile.
Usage
Run this skill when you want to add cloud logging to a project.
/setup-sap-btp-logging
Steps
-
Install Package:
npm install sap-btp-cloud-logging-client -
Create Utility Class: Copy
templates/LogUtils.tstosrc/utils/LogUtils.ts(or your preferred location).- Note: If using JS, you may need to strip types.
-
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":"..."} -
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/*'] }));