v0.1.4-pre.014
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-config-lib/src/management.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
/// Raw source of one registered Config document read for explicit management/correction.
|
||||
#[derive(Clone, Eq, PartialEq)]
|
||||
@@ -476,6 +476,12 @@ impl LoggingFileConfig {
|
||||
self.format = value.into();
|
||||
}
|
||||
|
||||
/// Returns whether ANSI output is requested.
|
||||
#[must_use]
|
||||
pub const fn ansi(&self) -> bool {
|
||||
return self.ansi;
|
||||
}
|
||||
|
||||
/// Returns the output filter.
|
||||
#[must_use]
|
||||
pub const fn filter(&self) -> &LoggingOutputFilterConfig {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-config-lib/tests/public_api.rs
|
||||
// version: 12
|
||||
// version: 13
|
||||
|
||||
//! Integration tests for the public `ksp-config-lib` bootstrap, registry, JSON/profile/composite, environment-resolution, sensitivity, Logging-adapter and
|
||||
//! management contracts.
|
||||
@@ -217,6 +217,8 @@ fn management_contracts_are_available_from_crate_root() {
|
||||
assert_eq!(logging.logs_directory(), "public-api-management-test");
|
||||
assert_eq!(logging.profiles().len(), 1);
|
||||
assert_eq!(logging.profiles()[0].profile_id(), "local_dev");
|
||||
assert_eq!(logging.profiles()[0].files().len(), 2);
|
||||
assert!(!logging.profiles()[0].files()[0].ansi());
|
||||
}
|
||||
}
|
||||
let save_source_candidate: fn(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-config-lib/unit_tests/management.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
static NEXT_FIXTURE_ID: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(1);
|
||||
|
||||
@@ -230,6 +230,8 @@ fn typed_logging_document_can_be_mutated_validated_and_persisted_atomically() {
|
||||
assert_eq!(document.format_version(), 1);
|
||||
assert_eq!(document.default_profile(), "local_dev");
|
||||
assert_eq!(document.profiles().len(), 1);
|
||||
assert_eq!(document.profiles()[0].files().len(), 2);
|
||||
assert!(!document.profiles()[0].files()[0].ansi());
|
||||
document.set_logs_directory("managed-logs");
|
||||
if let std::option::Option::Some(profile) = document.profiles_mut().first_mut() {
|
||||
profile.set_default_filter("info");
|
||||
|
||||
Reference in New Issue
Block a user