fix discrepancy between server and client logging
continuous-integration/drone/push Build is passing Details

This commit is contained in:
ayham 2021-08-08 08:19:30 +03:00
parent 554f6011a2
commit 915483c465
Signed by: ayham
GPG Key ID: EAB7F5A9DF503678
2 changed files with 3 additions and 2 deletions

View File

@ -62,13 +62,14 @@ fn libtrader_init_log() -> std::io::Result<()> {
let colors_level = colors_line.clone().info(Color::Green);
out.finish(format_args!(
"{color_line}{date}[{addr}][{level}{color_line}] {message}\x1B[0m",
"{color_line}{date}[{addr}][{target}][{level}{color_line}] {message}\x1B[0m",
color_line = format_args!(
"\x1B[{}m",
colors_level.get_color(&record.level()).to_fg_str()
),
date = chrono::Local::now().format("[%Y-%m-%d][%H:%M:%S]"),
addr = IP.get(),
target = record.target(),
level = record.level(),
message = message
))

View File

@ -1,6 +1,5 @@
## To do
- investigate server logging doesn't include location of log method caller
- create correct modules
* [ ] fix weird file naming
* [ ] fix namespace naming
@ -145,3 +144,4 @@
- use env.sh or arguments
- server move network code to somewhere plausable.
* [x] move assert_msg to message namespace
- investigate server logging doesn't include location of log method caller