Skip to content

Commit

Permalink
Allow ClamAV to disable container logging
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Oct 25, 2023
1 parent e3e67c6 commit 480d6cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ public interface ClamAVBuildConfig {
@WithDefault("false")
boolean freshClam();

/**
* Enable or disable ClamAV container logging
*/
@WithName("devservice.logging")
@WithDefault("true")
boolean logging();

/**
* If ClamAv registers in the health check by pinging the service.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public final class ClamAVContainer extends GenericContainer<ClamAVContainer> {
"/etc/clamav/clamd.conf");

// forward the container logs
super.withLogConsumer(new JbossContainerLogConsumer(log).withPrefix(NAME));
if (config.logging()) {
super.withLogConsumer(new JbossContainerLogConsumer(log).withPrefix(NAME));
}
}

@Override
Expand Down Expand Up @@ -90,4 +92,4 @@ public static String getTcpHost() {
return ConfigProvider.getConfig().getOptionalValue("quarkus.antivirus.clamav.host",
String.class).orElse("localhost");
}
}
}

0 comments on commit 480d6cb

Please sign in to comment.