[pbs-devel] [PATCH backup 3/4] tools: file logger: use option struct to control behavior

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Oct 16 10:46:13 CEST 2020


On 16.10.20 10:44, Dietmar Maurer wrote:
> 
>> -        let line = format!("{}: {}\n", rfc3339, msg);
>> +        let line = if self.options.prefix_time {
>> +            format!("{}: {}\n", rfc3339, msg)
>> +        } else {
>> +            format!("{}\n", msg)
>> +        };
> 
> This breaks the build (there is no prefix-time)
> 
> error[E0609]: no field `prefix_time` on type `tools::file_logger::FileLogOptions`
>   --> src/tools/file_logger.rs:67:36
>    |
> 67 |         let line = if self.options.prefix_time {
>    |                                    ^^^^^^^^^^^ unknown field
>    |
>    = note: available fields are: `to_stdout`
> 
> error: aborting due to previous error
> 

argh, sorry, to much git rebasing :(
I'll send a v2 





More information about the pbs-devel mailing list