Skip to content

Commit e86b446

Browse files
committed
ref introduce const CONTAINERDEBUG_LOG_DIRECTORY
1 parent cb76f4e commit e86b446

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

rust/operator-binary/src/hbase_controller.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ use stackable_hbase_crd::{
6868
METRICS_PORT, SSL_CLIENT_XML, SSL_SERVER_XML,
6969
};
7070

71-
use crate::product_logging::STACKABLE_LOG_DIR;
71+
use crate::product_logging::{CONTAINERDEBUG_LOG_DIRECTORY, STACKABLE_LOG_DIR};
7272
use crate::security::opa::HbaseOpaConfig;
7373
use crate::{
7474
discovery::build_discovery_configmap,
@@ -878,7 +878,7 @@ fn build_rolegroup_statefulset(
878878
// Needed for the `containerdebug` process to log it's tracing information to.
879879
.add_env_var(
880880
"CONTAINERDEBUG_LOG_DIRECTORY",
881-
format!("{STACKABLE_LOG_DIR}/containerdebug"),
881+
&*CONTAINERDEBUG_LOG_DIRECTORY,
882882
)
883883
.add_volume_mount("hbase-config", HBASE_CONFIG_TMP_DIR)
884884
.context(AddVolumeMountSnafu)?

rust/operator-binary/src/product_logging.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ const HBASE_LOG4J2_FILE: &str = "hbase.log4j2.xml";
4949
pub const LOG4J_CONFIG_FILE: &str = "log4j.properties";
5050
pub const LOG4J2_CONFIG_FILE: &str = "log4j2.properties";
5151
pub const STACKABLE_LOG_DIR: &str = "/stackable/log";
52+
pub static CONTAINERDEBUG_LOG_DIRECTORY: std::sync::LazyLock<String> =
53+
std::sync::LazyLock::new(|| format!("{STACKABLE_LOG_DIR}/containerdebug"));
5254

5355
/// Return the address of the Vector aggregator if the corresponding ConfigMap name is given in the
5456
/// cluster spec

0 commit comments

Comments
 (0)