Add safe logging utility for credential protection
- Created lib/safe-logging.ts with utilities for safe logging - logConfigSafely() automatically redacts credentials field - logSafely() redacts common sensitive fields (password, email, token, etc) - Updated enhanced-screenshot service to use safe logging utility - Provides reusable pattern for secure logging throughout codebase
This commit is contained in:
@@ -4,6 +4,7 @@ import path from 'path'
|
||||
import puppeteer from 'puppeteer'
|
||||
import { Browser, Page } from 'puppeteer'
|
||||
import { progressTracker, ProgressStep } from './progress-tracker'
|
||||
import { logConfigSafely } from './safe-logging'
|
||||
|
||||
export interface ScreenshotConfig {
|
||||
symbol: string
|
||||
@@ -28,13 +29,7 @@ export class EnhancedScreenshotService {
|
||||
|
||||
async captureWithLogin(config: ScreenshotConfig): Promise<string[]> {
|
||||
console.log('🚀 Enhanced Screenshot Service - Docker Environment (Dual Session)')
|
||||
console.log('📋 Config:', {
|
||||
symbol: config.symbol,
|
||||
timeframe: config.timeframe,
|
||||
layouts: config.layouts,
|
||||
sessionId: config.sessionId,
|
||||
credentials: '[REDACTED]'
|
||||
})
|
||||
logConfigSafely(config)
|
||||
|
||||
const screenshotFiles: string[] = []
|
||||
const { sessionId } = config
|
||||
|
||||
Reference in New Issue
Block a user