MCPcopy Create free account
hub / github.com/Qovery/engine / enable

Method enable

lib-engine/src/log_file_writer.rs:24–36  ·  view source on GitHub ↗
(&self, directory: &Path)

Source from the content-addressed store, hash-verified

22 }
23
24 pub fn enable(&self, directory: &Path) {
25 if let Ok(mut file) = self.lock_file() {
26 let file_path = directory.join("engine.log");
27 match File::create(file_path) {
28 Ok(new_file) => {
29 let new_file = BufWriter::new(new_file);
30 *file = Some(new_file);
31 self.file.0.store(true, Ordering::Relaxed)
32 }
33 Err(_) => *file = None,
34 }
35 }
36 }
37
38 pub fn disable(&self) {
39 if let Ok(mut file) = self.lock_file() {

Callers 1

enable_log_file_writerFunction · 0.80

Calls 1

lock_fileMethod · 0.80

Tested by

no test coverage detected