mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-09 17:29:28 +00:00
src/tools/file_logger.rs: new - accept AsRef<Path>
This commit is contained in:
parent
1ee4442d87
commit
e3e5ef3929
@ -34,7 +34,7 @@ macro_rules! flog {
|
||||
|
||||
impl FileLogger {
|
||||
|
||||
pub fn new(file_name: &str, to_stdout: bool) -> Result<Self, Error> {
|
||||
pub fn new<P: AsRef<std::path::Path>>(file_name: P, to_stdout: bool) -> Result<Self, Error> {
|
||||
|
||||
let file = std::fs::OpenOptions::new()
|
||||
.read(true)
|
||||
|
Loading…
Reference in New Issue
Block a user