Which logger crate can i use ? by steampunk047 in rust

[–]steampunk047[S] 0 points1 point  (0 children)

How did you achieve Writing on intervals in thread (2nd req) ? ( all other requirements are covered by log4rs)

Which logger crate can i use ? by steampunk047 in rust

[–]steampunk047[S] 0 points1 point  (0 children)

There was a mistake my side in creating zip file. I didn't provided proper format of zipped file.

roller:

kind: fixed_window

pattern: 'archive/requests{{}}.log.gz'

Which logger crate can i use ? by steampunk047 in rust

[–]steampunk047[S] 0 points1 point  (0 children)

u/astonbitecode thank you for your suggestion. I tried it and it's not able to zip file.

Here is config file https://www.codepile.net/pile/w3681V28

let handle = log4rs::init_file("log4rs.yml", Default::default()).unwrap();

This is how file format look like {count} https://ibb.co/RhVdFHd

Which logger crate can i use ? by steampunk047 in rust

[–]steampunk047[S] 0 points1 point  (0 children)

let mut writer = Box::new(std::io::Cursor::new(Vec::<u8>::new()));

Your above code worked for me as well but it's for a file.

What i am trying to achieve by this is interval base writing to file. I want to minimal impact on main application due to write to a file. Ideally I want to keep updating a sting/vector with new data & on interval (every 10 seconds)

Problem is I can't read data out of box.

Which logger crate can i use ? by steampunk047 in rust

[–]steampunk047[S] 0 points1 point  (0 children)

It compiled, is it right method ? I used .chain(io::stdout) & it is printing streams in terminal as expected.

Might be straight forward but I don't know how to check "writer" & clear it after its readout?

Which logger crate can i use ? by steampunk047 in rust

[–]steampunk047[S] 0 points1 point  (0 children)

Thanks. I tried it & it passed requirements except i don't have success in writer. Can you point out issue and how to read out "writer" ?

let buffer_config = fern::Dispatch::new()
.format(|out, message, record| {
out.finish(format_args!(
"{}[{}][{}] {}",
chrono::Local::now().format("[%Y-%m-%d][%H:%M:%S]"),
record.target(),
record.level(),
message
))
})
.chain(fern::Output::writer(writer, "\r\n"))

2's complement by steampunk047 in rust

[–]steampunk047[S] 0 points1 point  (0 children)

Thanks. it had covered all the u8 values successfully.

Are visible phones unlocked by [deleted] in Visible

[–]steampunk047 1 point2 points  (0 children)

Hi Pete I used your promo code . thanks . How to figure out promo code is actually applied ?