Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
ab38176adb
|
|||
ce8ac3c7f2
|
|||
a6d8eba632
|
|||
e5952d5467
|
|||
90f1515166
|
|||
fb4d9ee3f4
|
|||
2597cc87b8
|
|||
fbcf7ea4c5
|
|||
7b8f1cf81c
|
18
Cargo.lock
generated
18
Cargo.lock
generated
@ -31,9 +31,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.1.11"
|
version = "1.1.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5fb8dd288a69fc53a1996d7ecfbf4a20d59065bff137ce7e56bbd620de191189"
|
checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"shlex",
|
"shlex",
|
||||||
]
|
]
|
||||||
@ -96,9 +96,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.155"
|
version = "0.2.158"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
|
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
@ -108,7 +108,7 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "logtimes"
|
name = "logtimes"
|
||||||
version = "1.0.10"
|
version = "1.0.13"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
]
|
]
|
||||||
@ -139,9 +139,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.36"
|
version = "1.0.37"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
|
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
@ -154,9 +154,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.74"
|
version = "2.0.77"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7"
|
checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "logtimes"
|
name = "logtimes"
|
||||||
version = "1.0.10"
|
version = "1.0.13"
|
||||||
authors = ["Paul Schulze <p.schulze@avm.de>"]
|
authors = ["Paul Schulze <p.schulze@avm.de>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ features = ["std", "clock"]
|
|||||||
unsafe_code = "forbid"
|
unsafe_code = "forbid"
|
||||||
|
|
||||||
[lints.clippy]
|
[lints.clippy]
|
||||||
pedantic = "warn"
|
pedantic = { level = "warn", priority = -1 }
|
||||||
todo = "warn"
|
todo = "warn"
|
||||||
unwrap_used = "warn"
|
unwrap_used = "warn"
|
||||||
inline_always = "allow"
|
inline_always = "allow"
|
||||||
|
@ -6,7 +6,7 @@ use std::{
|
|||||||
|
|
||||||
use chrono::prelude::*;
|
use chrono::prelude::*;
|
||||||
|
|
||||||
const TIME_FORMAT: &str = "%H:%M:%S%.6f";
|
const TIME_FORMAT: &str = "%H:%M:%S%.3f";
|
||||||
|
|
||||||
type LogtimesResult = Result<(), IoError>;
|
type LogtimesResult = Result<(), IoError>;
|
||||||
|
|
||||||
@ -89,13 +89,13 @@ fn run() -> LogtimesResult {
|
|||||||
|
|
||||||
let end = trim_end(&linebuf);
|
let end = trim_end(&linebuf);
|
||||||
out.write_all(&linebuf[..end])?;
|
out.write_all(&linebuf[..end])?;
|
||||||
out.write_all(&[b'\r', b'\n'])?;
|
out.write_all(b"\r\n")?;
|
||||||
out.flush()?;
|
out.flush()?;
|
||||||
|
|
||||||
if let Some(ref mut f) = log_file {
|
if let Some(ref mut f) = log_file {
|
||||||
print_time(f)?;
|
print_time(f)?;
|
||||||
f.write_all(&linebuf[..end])?;
|
f.write_all(&linebuf[..end])?;
|
||||||
f.write_all(&[b'\n'])?;
|
f.write_all(b"\n")?;
|
||||||
f.flush()?;
|
f.flush()?;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user