Browse Source

Merge #329

329: Set default log level for whole crate r=da-kami a=bonomat

Resolves #325 

We were setting a filter for the binaries only and the rest was on INFO. 

```
2021-10-15 08:47:06  WARN (post_cfd_action) POST /api/cfd/<id>/<action>
2021-10-15 08:47:06  WARN 🥅 Catchers:
2021-10-15 08:47:06  WARN (unauthorized) 401
2021-10-15 08:47:06  WARN (unauthorized) /api 401
2021-10-15 08:47:06  WARN 📡 Fairings:
2021-10-15 08:47:06  WARN Shield (liftoff, response, singleton)
2021-10-15 08:47:06  WARN SQL migrations (ignite)
2021-10-15 08:47:06  WARN 'maker' Database Pool (ignite)
2021-10-15 08:47:06  WARN Create actors (ignite)
2021-10-15 08:47:06  INFO 🛡️ Shield:
2021-10-15 08:47:06  WARN 🚀 Rocket has launched from http://127.0.0.1:8001
2021-10-15 08:47:06  INFO New taker 0f54e159-75ac-4d65-9d9f-e37847e88572 connected on 127.0.0.1:64286
2021-10-15 08:47:13  INFO POST /api/order/sell application/json:
2021-10-15 08:47:13 DEBUG Received new order
2021-10-15 08:47:14  INFO GET /api/feed text/event-stream:
2021-10-15 08:47:16  INFO POST /api/order/sell application/json:
2021-10-15 08:47:16 DEBUG Received new order
2021-10-15 08:47:21 DEBUG Taker wants to take an order taker_id=0f54e159-75ac-4d65-9d9f-e37847e88572 quantity=0 order_id=ed6dfa48-275e-4eae-b2f5-5c3ad154eda4
2021-10-15 08:48:06 DEBUG Fetching announcement for /x/BitMEX/BXBT/2021-10-15T22:00:00.price?n=20
2021-10-15 08:48:34  INFO POST /api/order/sell application/json:
2021-10-15 08:48:34 DEBUG Received new order
2021-10-15 08:48:41 DEBUG Taker wants to take an order taker_id=0f54e159-75ac-4d65-9d9f-e37847e88572 quantity=11 order_id=7bbd174b-10a2-4776-9d00-afa41a8077ae
2021-10-15 08:48:45  INFO POST /api/cfd/7bbd174b-10a2-4776-9d00-afa41a8077ae/acceptOrder:
2021-10-15 08:48:45 DEBUG Maker accepts an order order_id=7bbd174b-10a2-4776-9d00-afa41a8077ae
2021-10-15 08:49:06 DEBUG Fetching announcement for /x/BitMEX/BXBT/2021-10-15T22:00:00.price?n=20
2021-10-15 08:49:38  INFO Lock transaction published with txid 09fdafb1125295ea66401e1160542fa39d5695d61d64255bb94431275f892cb4
2021-10-15 08:49:45 DEBUG Found relevant Bitcoin transaction txid=09fdafb1125295ea66401e1160542fa39d5695d61d64255bb94431275f892cb4 status=in mempool
```

Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
refactor/no-log-handler
bors[bot] 3 years ago
committed by GitHub
parent
commit
5030e2a51e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      daemon/src/logger.rs

1
daemon/src/logger.rs

@ -13,6 +13,7 @@ pub fn init(level: LevelFilter, json_format: bool) -> Result<()> {
let filter = EnvFilter::from_default_env()
.add_directive(format!("taker={}", level).parse()?)
.add_directive(format!("maker={}", level).parse()?)
.add_directive(format!("daemon={}", level).parse()?)
.add_directive(format!("rocket={}", level).parse()?);
let builder = FmtSubscriber::builder()

Loading…
Cancel
Save