Skip to content

Commit

Permalink
update config for DataDrivenGenerationConfig audit
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-higgins committed Jan 21, 2025
1 parent 45a1d6f commit 8da435c
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: © 2025 Gregory Higgins <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-only
*/

package com.fluxtion.compiler;

import com.fluxtion.runtime.audit.EventLogControlEvent.LogLevel;
Expand All @@ -24,7 +29,7 @@ public class DataDrivenGenerationConfig {
private List<Object> nodes;
private boolean enableAudit;
private boolean printEventToString = false;
private LogLevel auditMethodTraceLogLevel = LogLevel.DEBUG;
private LogLevel traceLogeLevel = LogLevel.NONE;
private FluxtionCompilerConfig compilerConfig;// = new FluxtionCompilerConfig();

@SneakyThrows
Expand All @@ -36,8 +41,12 @@ public RootNodeConfig getRootNodeConfig() {
public EventProcessorConfig getEventProcessorConfig() {
EventProcessorConfig eventProcessorConfig = new EventProcessorConfig();
eventProcessorConfig.setRootNodeConfig(getRootNodeConfig());
if (enableAudit)
eventProcessorConfig.addEventAudit(auditMethodTraceLogLevel, printEventToString);
if (enableAudit) {
eventProcessorConfig.addEventAudit();
}
if (traceLogeLevel != LogLevel.NONE) {
eventProcessorConfig.addEventAudit(traceLogeLevel, printEventToString);
}
return eventProcessorConfig;
}
}

0 comments on commit 8da435c

Please sign in to comment.