Skip to content
dynamic-loglevel-rfc-27 logo

Dynamic Log Level (RFC-27)

dynamic-loglevel-rfc-27

RFC-27 compliant runtime log level control for Java services. Covers proper log level usage, enabling dynamic log levels in estate-catalog, and changing levels via Developer Portal or Bitso CLI. Use when debugging production issues or configuring logging for services.

SKILL.md

Full skill instructions

Dynamic Log Level (RFC-27)

RFC-27 compliant runtime log level control for Java services. This skill covers proper log level usage, enabling the feature for your service, and changing levels at runtime.

When to Use This Skill

  • Understanding which log level to use for different scenarios
  • Enabling dynamic log level support for a new service
  • Changing log levels at runtime for debugging
  • Using Developer Portal or Bitso CLI to manage log levels

Skill Contents


Log Level Best Practices

Choosing the Right Level

LevelWhen to UseExamples
ERRORUnexpected failures requiring immediate attentionException handling, failed transactions, service unavailable
WARNPotential issues that don't stop executionDeprecated API usage, retry attempts, fallback activated
INFOKey business events and operational milestonesRequest received, transaction completed, service started
DEBUGDetailed information for troubleshootingMethod parameters, intermediate calculations, state changes
TRACEExtremely detailed (rarely used in production)Loop iterations, byte-level data, framework internals

Logging Guidelines

DO:

// ERROR - Actual failure with context
log.error("Payment processing failed for orderId={}, userId={}", orderId, userId, exception);

// WARN - Recoverable issue
log.warn("Rate limit approaching for userId={}, currentRate={}", userId, rate);

// INFO - Business event (no sensitive data)
log.info("Order completed: orderId={}, amount={}", orderId, amount);

// DEBUG - Technical details for troubleshooting
log.debug("Validating request payload: size={}, headers={}", payload.size(), headers);

DON'T:

// ❌ Don't log sensitive data
log.info("User logged in: email={}, password={}", email, password);

// ❌ Don't use ERROR for expected conditions
log.error("User not found"); // Use WARN or DEBUG

// ❌ Don't log without context
log.error("Failed"); // What failed? Where? Why?

// ❌ Don't use string concatenation
log.info("Processing order " + orderId); // Use parameterized logging

Consistent Logging Across Services

  • Use structured logging (see structured-logs-rfc-34 skill)
  • Include correlation IDs in all logs
  • Log entry/​exit for critical operations at DEBUG level
  • Default production level: INFO for com.bitso.*

Enabling Dynamic Log Levels

Prerequisites

Your service must be registered in estate-catalog. Most Bitso Spring Boot services already have the necessary infrastructure.

Step 1: Register in Estate Catalog

To enable dynamic log levels via Developer Portal and Bitso CLI, add the logs configuration to your entity's .cue file in estate-catalog.

  1. Open a PR to estate-catalog updating your entity file:
// catalog/​entities/​my-service.cue
{
    // ... existing configuration
    logs: {
        format:     "json"       // or "plain-text" for non-structured logs
        management: "managed"    // This enables dynamic log levels
    }
    // ... rest of configuration
}
  1. Merge the PR - Dynamic log levels will be available after the next estate-catalog sync

Step 2: Verify Setup

After registration, verify your service appears in the Developer Portal under the observability section with log level controls available.


Using Dynamic Log Levels

Option 1: Developer Portal (Recommended)

The Developer Portal provides a user-friendly interface for managing log levels.

  1. Navigate to Developer Portal → Services → Your Service
  2. Go to the Observability tab
  3. Select Log Levels section
  4. Choose the specific logger class (e.g., com.bitso.myservice.processor.OrderProcessor)
    • Tip: Start with the most specific logger to minimize log noise
    • Only broaden to package level if the specific class doesn't help
  5. Select the desired level from the dropdown
  6. Click Apply

The change takes effect immediately across all instances.

Option 2: Bitso CLI

For command-line access or automation:

# List current log levels for a service
bitso logs level list --service my-service

# Get level for a specific logger (use specific class for targeted debugging)
bitso logs level get --service my-service --logger com.bitso.payments.processor.PaymentProcessor

# Set log level (prefer specific class over full package)
bitso logs level set --service my-service --logger com.bitso.payments.processor.PaymentProcessor --level DEBUG

# Reset to default
bitso logs level reset --service my-service --logger com.bitso.payments.processor.PaymentProcessor

# Set temporary level (auto-resets after duration)
bitso logs level set --service my-service --logger com.bitso.payments.processor.PaymentProcessor --level DEBUG --duration 30m

Available Log Levels

LevelDescription
TRACEMost detailed logging
DEBUGDevelopment and troubleshooting
INFONormal operations (default)
WARNPotential issues
ERRORErrors only
OFFDisable logging for this logger

Operational Workflows

Debugging a Production Issue

  1. Identify the specific class/​logger causing the issue (prefer specific class over full package)

  2. Set DEBUG level temporarily:

    # Target the specific class first for minimal log noise
    bitso logs level set --service my-service --logger com.bitso.payments.processor.PaymentProcessor --level DEBUG --duration 15m
    
    # Only broaden to package if needed
    bitso logs level set --service my-service --logger com.bitso.payments.processor --level DEBUG --duration 15m
    
  3. Reproduce the issue and capture logs

  4. Level auto-resets after the duration expires

  5. Analyze logs in Datadog/​observability platform

Bulk Operations for Related Services

When debugging a flow across multiple services (use sparingly - prefer specific loggers):

# Set DEBUG on a specific component across services
for service in order-service payment-service notification-service; do
  bitso logs level set --service $service --logger com.bitso.common.validation.RequestValidator --level DEBUG --duration 30m
done

Audit Trail

All log level changes are audited:

  • Who made the change
  • When it was made
  • What was changed (logger, old level, new level)
  • Duration if temporary

View audit logs in the Developer Portal or via:

bitso logs level history --service my-service

References

ReferenceDescription
Confluence: How to use dynamic log levelOfficial documentation

Related Skills

SkillPurpose
logback-config-rfc-27Static Logback configuration
structured-logs-rfc-34Structured logging format
<!-- AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY --> <!-- Source: bitsoex/​ai-code-instructions → java/​skills/​dynamic-loglevel-rfc-27/​SKILL.md --> <!-- To modify, edit the source file and run the distribution workflow -->

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View