feat: rename logForwardingLevel to applicationLogLevel, add agentLogLevel
Align with cameleer3-common rename: logForwardingLevel → applicationLogLevel (root logger) and new agentLogLevel (com.cameleer3 logger). Both fields are on ApplicationConfig, pushed via config-update. UI shows "App Log Level" and "Agent Log Level" on AppConfig slide-in, AgentHealth config bar, and AppConfigDetailPage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -199,7 +199,8 @@ public class ApplicationConfigController {
|
||||
config.setMetricsEnabled(true);
|
||||
config.setSamplingRate(1.0);
|
||||
config.setTracedProcessors(Map.of());
|
||||
config.setLogForwardingLevel("INFO");
|
||||
config.setApplicationLogLevel("INFO");
|
||||
config.setAgentLogLevel("INFO");
|
||||
config.setEngineLevel("REGULAR");
|
||||
config.setPayloadCaptureMode("NONE");
|
||||
return config;
|
||||
|
||||
@@ -22,7 +22,8 @@ export interface ApplicationConfig {
|
||||
updatedAt?: string
|
||||
engineLevel?: string
|
||||
payloadCaptureMode?: string
|
||||
logForwardingLevel?: string
|
||||
applicationLogLevel?: string
|
||||
agentLogLevel?: string
|
||||
metricsEnabled: boolean
|
||||
samplingRate: number
|
||||
tracedProcessors: Record<string, string>
|
||||
|
||||
@@ -91,7 +91,8 @@ export default function AppConfigDetailPage() {
|
||||
useEffect(() => {
|
||||
if (config) {
|
||||
setForm({
|
||||
logForwardingLevel: config.logForwardingLevel ?? 'INFO',
|
||||
applicationLogLevel: config.applicationLogLevel ?? 'INFO',
|
||||
agentLogLevel: config.agentLogLevel ?? 'INFO',
|
||||
engineLevel: config.engineLevel ?? 'REGULAR',
|
||||
payloadCaptureMode: config.payloadCaptureMode ?? 'NONE',
|
||||
metricsEnabled: config.metricsEnabled,
|
||||
@@ -106,7 +107,8 @@ export default function AppConfigDetailPage() {
|
||||
function startEditing() {
|
||||
if (!config) return;
|
||||
setForm({
|
||||
logForwardingLevel: config.logForwardingLevel ?? 'INFO',
|
||||
applicationLogLevel: config.applicationLogLevel ?? 'INFO',
|
||||
agentLogLevel: config.agentLogLevel ?? 'INFO',
|
||||
engineLevel: config.engineLevel ?? 'REGULAR',
|
||||
payloadCaptureMode: config.payloadCaptureMode ?? 'NONE',
|
||||
metricsEnabled: config.metricsEnabled,
|
||||
@@ -327,10 +329,10 @@ export default function AppConfigDetailPage() {
|
||||
<SectionHeader>Settings</SectionHeader>
|
||||
<div className={styles.settingsGrid}>
|
||||
<div className={styles.field}>
|
||||
<label className={styles.label}>Log Forwarding Level</label>
|
||||
<label className={styles.label}>App Log Level</label>
|
||||
{editing ? (
|
||||
<select className={styles.select} value={String(form.logForwardingLevel)}
|
||||
onChange={(e) => updateField('logForwardingLevel', e.target.value)}>
|
||||
<select className={styles.select} value={String(form.applicationLogLevel)}
|
||||
onChange={(e) => updateField('applicationLogLevel', e.target.value)}>
|
||||
<option value="ERROR">ERROR</option>
|
||||
<option value="WARN">WARN</option>
|
||||
<option value="INFO">INFO</option>
|
||||
@@ -338,7 +340,22 @@ export default function AppConfigDetailPage() {
|
||||
<option value="TRACE">TRACE</option>
|
||||
</select>
|
||||
) : (
|
||||
<Badge label={String(form.logForwardingLevel)} color={logLevelColor(form.logForwardingLevel as string)} variant="filled" />
|
||||
<Badge label={String(form.applicationLogLevel)} color={logLevelColor(form.applicationLogLevel as string)} variant="filled" />
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.field}>
|
||||
<label className={styles.label}>Agent Log Level</label>
|
||||
{editing ? (
|
||||
<select className={styles.select} value={String(form.agentLogLevel ?? 'INFO')}
|
||||
onChange={(e) => updateField('agentLogLevel', e.target.value)}>
|
||||
<option value="ERROR">ERROR</option>
|
||||
<option value="WARN">WARN</option>
|
||||
<option value="INFO">INFO</option>
|
||||
<option value="DEBUG">DEBUG</option>
|
||||
<option value="TRACE">TRACE</option>
|
||||
</select>
|
||||
) : (
|
||||
<Badge label={String(form.agentLogLevel ?? 'INFO')} color={logLevelColor(form.agentLogLevel as string)} variant="filled" />
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.field}>
|
||||
|
||||
@@ -54,7 +54,8 @@ function captureColor(mode: string): BadgeColor {
|
||||
function buildColumns(): Column<ConfigRow>[] {
|
||||
return [
|
||||
{ key: 'application', header: 'Application', sortable: true, render: (_v, row) => <MonoText size="sm">{row.application}</MonoText> },
|
||||
{ key: 'logForwardingLevel', header: 'Log Level', render: (_v, row) => { const val = row.logForwardingLevel ?? 'INFO'; return <Badge label={val} color={logLevelColor(val)} variant="filled" />; } },
|
||||
{ key: 'applicationLogLevel', header: 'App Log', render: (_v, row) => { const val = row.applicationLogLevel ?? 'INFO'; return <Badge label={val} color={logLevelColor(val)} variant="filled" />; } },
|
||||
{ key: 'agentLogLevel', header: 'Agent Log', render: (_v, row) => { const val = row.agentLogLevel ?? 'INFO'; return <Badge label={val} color={logLevelColor(val)} variant="filled" />; } },
|
||||
{ key: 'engineLevel', header: 'Engine Level', render: (_v, row) => { const val = row.engineLevel ?? 'REGULAR'; return <Badge label={val} color={engineLevelColor(val)} variant="filled" />; } },
|
||||
{ key: 'payloadCaptureMode', header: 'Payload Capture', render: (_v, row) => { const val = row.payloadCaptureMode ?? 'NONE'; return <Badge label={val} color={payloadColor(val)} variant="filled" />; } },
|
||||
{ key: 'metricsEnabled', header: 'Metrics', width: '80px', render: (_v, row) => <Badge label={row.metricsEnabled ? 'On' : 'Off'} color={row.metricsEnabled ? 'success' : 'error'} variant="filled" /> },
|
||||
@@ -91,7 +92,8 @@ function AppConfigDetail({ appId, onClose }: { appId: string; onClose: () => voi
|
||||
useEffect(() => {
|
||||
if (config) {
|
||||
setForm({
|
||||
logForwardingLevel: config.logForwardingLevel ?? 'INFO',
|
||||
applicationLogLevel: config.applicationLogLevel ?? 'INFO',
|
||||
agentLogLevel: config.agentLogLevel ?? 'INFO',
|
||||
engineLevel: config.engineLevel ?? 'REGULAR',
|
||||
payloadCaptureMode: config.payloadCaptureMode ?? 'NONE',
|
||||
metricsEnabled: config.metricsEnabled,
|
||||
@@ -106,7 +108,8 @@ function AppConfigDetail({ appId, onClose }: { appId: string; onClose: () => voi
|
||||
function startEditing() {
|
||||
if (!config) return;
|
||||
setForm({
|
||||
logForwardingLevel: config.logForwardingLevel ?? 'INFO',
|
||||
applicationLogLevel: config.applicationLogLevel ?? 'INFO',
|
||||
agentLogLevel: config.agentLogLevel ?? 'INFO',
|
||||
engineLevel: config.engineLevel ?? 'REGULAR',
|
||||
payloadCaptureMode: config.payloadCaptureMode ?? 'NONE',
|
||||
metricsEnabled: config.metricsEnabled,
|
||||
@@ -239,10 +242,16 @@ function AppConfigDetail({ appId, onClose }: { appId: string; onClose: () => voi
|
||||
<div className={styles.panelSectionHeader}>Settings</div>
|
||||
<div className={styles.settingsGrid}>
|
||||
<div className={styles.field}>
|
||||
<span className={styles.fieldLabel}>Log Forwarding</span>
|
||||
<span className={styles.fieldLabel}>App Log Level</span>
|
||||
{editing
|
||||
? <select className={styles.select} value={String(form.logForwardingLevel)} onChange={(e) => updateField('logForwardingLevel', e.target.value)}><option value="ERROR">ERROR</option><option value="WARN">WARN</option><option value="INFO">INFO</option><option value="DEBUG">DEBUG</option><option value="TRACE">TRACE</option></select>
|
||||
: <Badge label={String(form.logForwardingLevel)} color={logLevelColor(form.logForwardingLevel as string)} variant="filled" />}
|
||||
? <select className={styles.select} value={String(form.applicationLogLevel)} onChange={(e) => updateField('applicationLogLevel', e.target.value)}><option value="ERROR">ERROR</option><option value="WARN">WARN</option><option value="INFO">INFO</option><option value="DEBUG">DEBUG</option><option value="TRACE">TRACE</option></select>
|
||||
: <Badge label={String(form.applicationLogLevel)} color={logLevelColor(form.applicationLogLevel as string)} variant="filled" />}
|
||||
</div>
|
||||
<div className={styles.field}>
|
||||
<span className={styles.fieldLabel}>Agent Log Level</span>
|
||||
{editing
|
||||
? <select className={styles.select} value={String(form.agentLogLevel ?? 'INFO')} onChange={(e) => updateField('agentLogLevel', e.target.value)}><option value="ERROR">ERROR</option><option value="WARN">WARN</option><option value="INFO">INFO</option><option value="DEBUG">DEBUG</option><option value="TRACE">TRACE</option></select>
|
||||
: <Badge label={String(form.agentLogLevel ?? 'INFO')} color={logLevelColor(form.agentLogLevel as string)} variant="filled" />}
|
||||
</div>
|
||||
<div className={styles.field}>
|
||||
<span className={styles.fieldLabel}>Engine Level</span>
|
||||
|
||||
@@ -255,7 +255,8 @@ export default function AgentHealth() {
|
||||
const startConfigEdit = useCallback(() => {
|
||||
if (!appConfig) return;
|
||||
setConfigDraft({
|
||||
logForwardingLevel: appConfig.logForwardingLevel ?? 'INFO',
|
||||
applicationLogLevel: appConfig.applicationLogLevel ?? 'INFO',
|
||||
agentLogLevel: appConfig.agentLogLevel ?? 'INFO',
|
||||
engineLevel: appConfig.engineLevel ?? 'REGULAR',
|
||||
payloadCaptureMode: appConfig.payloadCaptureMode ?? 'NONE',
|
||||
metricsEnabled: appConfig.metricsEnabled,
|
||||
@@ -530,9 +531,20 @@ export default function AgentHealth() {
|
||||
{configEditing ? (
|
||||
<>
|
||||
<div className={styles.configField}>
|
||||
<span className={styles.configLabel}>Log Level</span>
|
||||
<select className={styles.configSelect} value={String(configDraft.logForwardingLevel ?? 'INFO')}
|
||||
onChange={(e) => setConfigDraft(d => ({ ...d, logForwardingLevel: e.target.value }))}>
|
||||
<span className={styles.configLabel}>App Log Level</span>
|
||||
<select className={styles.configSelect} value={String(configDraft.applicationLogLevel ?? 'INFO')}
|
||||
onChange={(e) => setConfigDraft(d => ({ ...d, applicationLogLevel: e.target.value }))}>
|
||||
<option value="ERROR">ERROR</option>
|
||||
<option value="WARN">WARN</option>
|
||||
<option value="INFO">INFO</option>
|
||||
<option value="DEBUG">DEBUG</option>
|
||||
<option value="TRACE">TRACE</option>
|
||||
</select>
|
||||
</div>
|
||||
<div className={styles.configField}>
|
||||
<span className={styles.configLabel}>Agent Log Level</span>
|
||||
<select className={styles.configSelect} value={String(configDraft.agentLogLevel ?? 'INFO')}
|
||||
onChange={(e) => setConfigDraft(d => ({ ...d, agentLogLevel: e.target.value }))}>
|
||||
<option value="ERROR">ERROR</option>
|
||||
<option value="WARN">WARN</option>
|
||||
<option value="INFO">INFO</option>
|
||||
@@ -573,12 +585,21 @@ export default function AgentHealth() {
|
||||
) : (
|
||||
<>
|
||||
<div className={styles.configField}>
|
||||
<span className={styles.configLabel}>Log Level</span>
|
||||
<Badge label={appConfig.logForwardingLevel ?? 'INFO'} color={
|
||||
(appConfig.logForwardingLevel ?? 'INFO') === 'ERROR' ? 'error'
|
||||
: (appConfig.logForwardingLevel ?? 'INFO') === 'WARN' ? 'warning'
|
||||
: (appConfig.logForwardingLevel ?? 'INFO') === 'DEBUG' ? 'running'
|
||||
: (appConfig.logForwardingLevel ?? 'INFO') === 'TRACE' ? 'auto' : 'success'
|
||||
<span className={styles.configLabel}>App Log Level</span>
|
||||
<Badge label={appConfig.applicationLogLevel ?? 'INFO'} color={
|
||||
(appConfig.applicationLogLevel ?? 'INFO') === 'ERROR' ? 'error'
|
||||
: (appConfig.applicationLogLevel ?? 'INFO') === 'WARN' ? 'warning'
|
||||
: (appConfig.applicationLogLevel ?? 'INFO') === 'DEBUG' ? 'running'
|
||||
: (appConfig.applicationLogLevel ?? 'INFO') === 'TRACE' ? 'auto' : 'success'
|
||||
} variant="filled" />
|
||||
</div>
|
||||
<div className={styles.configField}>
|
||||
<span className={styles.configLabel}>Agent Log Level</span>
|
||||
<Badge label={appConfig.agentLogLevel ?? 'INFO'} color={
|
||||
(appConfig.agentLogLevel ?? 'INFO') === 'ERROR' ? 'error'
|
||||
: (appConfig.agentLogLevel ?? 'INFO') === 'WARN' ? 'warning'
|
||||
: (appConfig.agentLogLevel ?? 'INFO') === 'DEBUG' ? 'running'
|
||||
: (appConfig.agentLogLevel ?? 'INFO') === 'TRACE' ? 'auto' : 'success'
|
||||
} variant="filled" />
|
||||
</div>
|
||||
<div className={styles.configField}>
|
||||
|
||||
Reference in New Issue
Block a user