Skip to content

Commit 91beab2

Browse files
chore(stackable-operator): Re-introduce #950 (#989)
* chore(stackable-operator): Deprecate initialize_logging function * fix(docs): Remove duplicate imports * chore: Apply suggestion Co-authored-by: Nick <[email protected]> --------- Co-authored-by: Nick <[email protected]>
1 parent 650ac95 commit 91beab2

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

crates/stackable-operator/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ All notable changes to this project will be documented in this file.
88

99
- Add Deployments to `ClusterResource`s ([#992]).
1010

11+
### Changed
12+
13+
- Deprecate `stackable_operator::logging::initialize_logging()`. It's recommended to use `stackable-telemetry` instead ([#950], [#989]).
14+
15+
[#950]: https://github.com/stackabletech/operator-rs/pull/950
16+
[#989]: https://github.com/stackabletech/operator-rs/pull/989
1117
[#992]: https://github.com/stackabletech/operator-rs/pull/992
1218

1319
## [0.87.5] - 2025-03-19

crates/stackable-operator/src/cluster_resources.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ use std::{
55
fmt::Debug,
66
};
77

8+
#[cfg(doc)]
9+
use k8s_openapi::api::core::v1::{NodeSelector, Pod};
810
use k8s_openapi::{
911
api::{
1012
apps::v1::{
@@ -26,11 +28,6 @@ use snafu::{OptionExt, ResultExt, Snafu};
2628
use strum::Display;
2729
use tracing::{debug, info, warn};
2830

29-
#[cfg(doc)]
30-
use crate::k8s_openapi::api::{
31-
apps::v1::Deployment,
32-
core::v1::{NodeSelector, Pod},
33-
};
3431
use crate::{
3532
client::{Client, GetApi},
3633
commons::{

crates/stackable-operator/src/logging/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ impl Default for TracingTarget {
2828
///
2929
/// Log output can be copied to a file by setting `{env}_DIRECTORY` (e.g. `FOOBAR_OPERATOR_DIRECTORY`)
3030
/// to a directory path. This file will be rotated regularly.
31+
#[deprecated(note = "Use stackable-telemetry with the OTLP instead of the Jaeger protocol")]
3132
pub fn initialize_logging(env: &str, app_name: &str, tracing_target: TracingTarget) {
3233
let filter = match EnvFilter::try_from_env(env) {
3334
Ok(env_filter) => env_filter,
@@ -94,6 +95,7 @@ mod tests {
9495
// NOT_SET=debug cargo test default_tracing -- --nocapture
9596
// to see them all.
9697
#[test]
98+
#[allow(deprecated)]
9799
fn default_tracing_level_is_set_to_info() {
98100
super::initialize_logging("NOT_SET", "test", TracingTarget::None);
99101

0 commit comments

Comments
 (0)