fix(logging): update environment variable references from ROO_CODE_LOGGING to ROO_CODE_API_LOGGING

This commit is contained in:
Hannes Rudolph 2025-12-18 09:17:31 -07:00 committed by daniel-lxs
parent 00ddd926b8
commit a110c3b36e
No known key found for this signature in database
GPG key ID: 21C74479048B3AA6
2 changed files with 4 additions and 7 deletions

View file

@ -3,10 +3,7 @@
* Provides consistent logging for all API requests and responses across providers
*
* Enable logging by:
* 1. Setting ROO_CODE_LOGGING=true in workspace .env.local file
* 2. Setting ROO_CODE_LOGGING=true in process environment
* 3. Setting VSCODE_DEBUG_MODE=true in process environment
*
* 1. Setting ROO_CODE_API_LOGGING=true in workspace .env.local file
* Logs will appear in the Output/Debug console as simple console.log statements.
*/
@ -25,7 +22,7 @@ import { isLoggingEnabled } from "./env-config"
* Centralized API logging service
* Singleton instance that all providers route through for consistent logging
*
* When ROO_CODE_LOGGING=true, logs are output via console.log/console.error
* When ROO_CODE_API_LOGGING=true, logs are output via console.log/console.error
* for visibility in VS Code's Output panel and Debug Console.
*/
class ApiLoggerService {
@ -56,7 +53,7 @@ class ApiLoggerService {
/**
* Check if logging should actually output
* Requires both: config.enabled AND ROO_CODE_LOGGING=true
* Requires both: config.enabled AND ROO_CODE_API_LOGGING=true
*/
private shouldLog(): boolean {
return this.config.enabled && isLoggingEnabled()

View file

@ -23,6 +23,6 @@ const noopLogger = {
* Uses CompactLogger for test environment, switches to noop logger in production
*
* Note: For API logging, use the ApiLogger from src/api/core/logging which
* outputs to console.log when ROO_CODE_LOGGING=true
* outputs to console.log when ROO_CODE_API_LOGGING=true
*/
export const logger = process.env.NODE_ENV === "test" ? new CompactLogger() : noopLogger