pub fn insert_process_vars<P: AsRef<Path>>(&mut self, path: P) {
        // add config file name
        self.global_vars.insert(
            prefix_var!("CONFIG_FILE").to_string(),
            path.as_ref().to_string_lossy().to_string(),
        );

        // now just add variables
        self.global_vars
            .insert(prefix_var!("USER").to_string(), whoami::username());
        self.global_vars
            .insert(prefix_var!("HOSTNAME").to_string(), whoami::hostname());
        self.global_vars.insert(
            prefix_var!("PLATFORM").to_string(),
            whoami::platform().to_string(),
        );
    }
/// Add variables like user, platform etc not dependant from a logfile
Add variables like user, platform etc not dependant from a logfile
Add variables like user platform etc not dependant from a logfile
pub fn insert_process_vars<P: AsRef<Path>>(&mut self, path: P) {
        // add config file name
        self.global_vars.insert(
            prefix_var!("CONFIG_FILE").to_string(),
            path.as_ref().to_string_lossy().to_string(),
        );
        // now just add variables
        self.global_vars
            .insert(prefix_var!("USER").to_string(), whoami::username());
        self.global_vars
            .insert(prefix_var!("HOSTNAME").to_string(), whoami::hostname());
        self.global_vars.insert(
            prefix_var!("PLATFORM").to_string(),
            whoami::platform().to_string(),
        );
    }
pub fn insert_process_vars < P : AsRef < Path > > ( & mut self , path : P ) { // add config file name self . global_vars . insert ( prefix_var ! ( " " ) . to_string ( ) , path . as_ref ( ) . to_string_lossy ( ) . to_string ( ) , ) ; // now just add variables self . global_vars . insert ( prefix_var ! ( " " ) . to_string ( ) , whoami :: username ( ) ) ; self . global_vars . insert ( prefix_var ! ( " " ) . to_string ( ) , whoami :: hostname ( ) ) ; self . global_vars . insert ( prefix_var ! ( " " ) . to_string ( ) , whoami :: platform ( ) . to_string ( ) , ) ; }
Add variables like user, platform etc not dependant from a logfile
Add variables like user platform etc not dependant from a logfile
&mut self
path
P
&mut self
path
P