mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix(logging): update environment variable references from ROO_CODE_LOGGING to ROO_CODE_API_LOGGING
This commit is contained in:
parent
00ddd926b8
commit
a110c3b36e
2 changed files with 4 additions and 7 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue