mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-03-01 12:20:49 +00:00
* Improved logging using nimbus-eth2 options - log file support removal - auto detection of tty, colour support and related. * Added EthTime serializer (implemented on eth_types_json_serialization) * added json chronicles logging support for some eth, web3 and confutils types --------- Co-authored-by: Pedro Miranda <pedro.miranda@nimbus.team>
36 lines
1.0 KiB
Nim
36 lines
1.0 KiB
Nim
# Nimbus
|
|
# Copyright (c) 2025 Status Research & Development GmbH
|
|
# Licensed under either of
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
|
# at your option.
|
|
# This file may not be copied, modified, or distributed except according to
|
|
# those terms.
|
|
|
|
import
|
|
std/[typetraits, net],
|
|
json_serialization,
|
|
web3/primitives,
|
|
confutils/defs,
|
|
eth/common/eth_types_json_serialization
|
|
|
|
# nim-eth
|
|
proc writeValue*(
|
|
w: var JsonWriter, v: EthTime | NetworkId | ChainId
|
|
) {.inline, raises: [IOError].} =
|
|
w.writeValue distinctBase(v)
|
|
|
|
# nim-web3
|
|
proc writeValue*(w: var JsonWriter, v: Quantity) {.inline, raises: [IOError].} =
|
|
w.writeValue distinctBase(v)
|
|
|
|
# nim-confutils
|
|
proc writeValue*(
|
|
w: var JsonWriter, v: InputFile | OutDir | OutFile | RestOfCmdLine | OutPath
|
|
) {.inline, raises: [IOError].} =
|
|
w.writeValue distinctBase(v)
|
|
|
|
# build-system
|
|
proc writeValue*(w: var JsonWriter, v: Port) {.inline, raises: [IOError].} =
|
|
w.writeValue distinctBase(v)
|