// src/server/features/system/system.service.ts
// Business logic for system management

import { loggerService } from '../../shared/lib/logger';
import type { LogChannel, LogLevel, LogConfig } from '@shared/contracts/logger';

/**
 * Get current log configuration
 * @returns Current log configuration
 */
export function getLogConfig(): LogConfig {
  return loggerService.getConfig();
}

/**
 * Update log level for a specific channel
 * @param channel - The channel to update
 * @param level - The new log level
 * @returns Updated log configuration
 */
export function updateLogConfig(channel: LogChannel, level: LogLevel): LogConfig {
  loggerService.updateConfig(channel, level);
  return loggerService.getConfig();
}

/**
 * Reset all log levels to default
 * @returns Default log configuration
 */
export function resetLogConfig(): LogConfig {
  loggerService.resetConfig();
  return loggerService.getConfig();
}
