Add bundled file policy setters

This commit is contained in:
Nanaloveyuki
2026-05-10 13:31:49 +08:00
parent ea19d3b9fd
commit ec0b7699fe
8 changed files with 90 additions and 0 deletions
+6
View File
@@ -198,6 +198,12 @@ pub fn FileSink::set_auto_flush(self : FileSink, enabled : Bool) -> Unit {
self.auto_flush.val = enabled
}
pub fn FileSink::set_policy(self : FileSink, policy : FileSinkPolicy) -> Unit {
self.append.val = policy.append
self.auto_flush.val = policy.auto_flush
self.rotation.val = policy.rotation
}
pub fn FileSink::set_rotation(self : FileSink, rotation : FileRotation?) -> Unit {
self.rotation.val = rotation
}