Alpha/Daemons: improve logging
This commit is contained in:
parent
9d20295a2b
commit
bfe625e27b
@ -204,9 +204,11 @@ let compute_timeout state =
|
|||||||
| None -> Lwt.return (block, delegates)
|
| None -> Lwt.return (block, delegates)
|
||||||
| Some timeout ->
|
| Some timeout ->
|
||||||
lwt_log_info Tag.DSL.(fun f ->
|
lwt_log_info Tag.DSL.(fun f ->
|
||||||
f "Waiting until %a to inject endorsements"
|
f "Waiting until %a (%a) to inject endorsements"
|
||||||
-% t event "wait_before_injecting"
|
-% t event "wait_before_injecting"
|
||||||
-% a timestamp_tag time) >>= fun () ->
|
-% a timestamp_tag time
|
||||||
|
-% a timespan_tag (max 0L Time.(diff time (now ())))
|
||||||
|
) >>= fun () ->
|
||||||
timeout >>= fun () -> Lwt.return (block, delegates)
|
timeout >>= fun () -> Lwt.return (block, delegates)
|
||||||
|
|
||||||
let create
|
let create
|
||||||
|
@ -134,7 +134,7 @@ let () =
|
|||||||
~description: ""
|
~description: ""
|
||||||
~pp:(fun ppf (op, err) ->
|
~pp:(fun ppf (op, err) ->
|
||||||
let h = Tezos_base.Operation.hash op in
|
let h = Tezos_base.Operation.hash op in
|
||||||
Format.fprintf ppf "@[Failed to preapply %a:@ %a@]"
|
Format.fprintf ppf "@[Failed to preapply %a:@ @[<v 4>%a@]@]"
|
||||||
Operation_hash.pp_short h
|
Operation_hash.pp_short h
|
||||||
pp_print_error err)
|
pp_print_error err)
|
||||||
Data_encoding.
|
Data_encoding.
|
||||||
@ -418,7 +418,7 @@ let filter_and_apply_operations
|
|||||||
add_operation inc op >>= function
|
add_operation inc op >>= function
|
||||||
| Error errs ->
|
| Error errs ->
|
||||||
lwt_log_info Tag.DSL.(fun f ->
|
lwt_log_info Tag.DSL.(fun f ->
|
||||||
f "Client-side validation: invalid operation filtered %a\n%a"
|
f "Client-side validation: invalid operation filtered %a\n@[<v 4>%a@]"
|
||||||
-% t event "baking_rejected_invalid_operation"
|
-% t event "baking_rejected_invalid_operation"
|
||||||
-% a Operation_hash.Logging.tag (Operation.hash_packed op)
|
-% a Operation_hash.Logging.tag (Operation.hash_packed op)
|
||||||
-% a errs_tag errs)
|
-% a errs_tag errs)
|
||||||
@ -679,7 +679,7 @@ let fetch_operations
|
|||||||
f "No endorsements present in the mempool. Waiting until %a (%a) for new operations."
|
f "No endorsements present in the mempool. Waiting until %a (%a) for new operations."
|
||||||
-% t event "waiting_operations"
|
-% t event "waiting_operations"
|
||||||
-% a timestamp_tag limit_date
|
-% a timestamp_tag limit_date
|
||||||
-% a timespan_tag timespan
|
-% a timespan_tag (max 0L Time.(diff limit_date (now ())))
|
||||||
) >>= fun () ->
|
) >>= fun () ->
|
||||||
let timeout = match Client_baking_scheduling.sleep_until limit_date with
|
let timeout = match Client_baking_scheduling.sleep_until limit_date with
|
||||||
| None -> Lwt.return_unit
|
| None -> Lwt.return_unit
|
||||||
@ -766,8 +766,8 @@ let build_block
|
|||||||
let protocol_data = forge_faked_protocol_data ~priority ~seed_nonce_hash in
|
let protocol_data = forge_faked_protocol_data ~priority ~seed_nonce_hash in
|
||||||
filter_and_apply_operations ~timestamp ~protocol_data state bi operations >>= function
|
filter_and_apply_operations ~timestamp ~protocol_data state bi operations >>= function
|
||||||
| Error errs ->
|
| Error errs ->
|
||||||
lwt_log_error Tag.DSL.(fun f ->
|
lwt_log_info Tag.DSL.(fun f ->
|
||||||
f "Client-side validation: error while filtering invalid operations :@\n@[<v 2]%a@]"
|
f "Client-side validation: error while filtering invalid operations :@\n@[<v 4>%a@]"
|
||||||
-% t event "client_side_validation_error"
|
-% t event "client_side_validation_error"
|
||||||
-% a errs_tag errs) >>= fun () ->
|
-% a errs_tag errs) >>= fun () ->
|
||||||
lwt_log_notice Tag.DSL.(fun f ->
|
lwt_log_notice Tag.DSL.(fun f ->
|
||||||
|
Loading…
Reference in New Issue
Block a user