Skip to content

Commit

Permalink
Revert "fix: log-level being ignored (#1272)"
Browse files Browse the repository at this point in the history
This reverts commit df6d215.
  • Loading branch information
Lorenzo Delgado committed Oct 20, 2022
1 parent 4009519 commit 6058636
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ endif
# use a separate waku discv5 network with `protocol-id="d5waku"`
NIM_PARAMS := $(NIM_PARAMS) -d:discv5_protocol_id:d5waku

# enable runtime log-level filtering (see setLogLevel)
NIM_PARAMS := $(NIM_PARAMS) -d:chronicles_runtime_filtering:on

# git version for JSON RPC call
GIT_VERSION ?= $(shell git describe --abbrev=6 --always --tags)
NIM_PARAMS := $(NIM_PARAMS) -d:git_version:\"$(GIT_VERSION)\"
Expand Down
9 changes: 2 additions & 7 deletions apps/chat2/chat2.nim
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,10 @@ proc readInput(wfd: AsyncFD) {.thread, raises: [Defect, CatchableError].} =

{.pop.} # @TODO confutils.nim(775, 17) Error: can raise an unlisted exception: ref IOError
proc processInput(rfd: AsyncFD) {.async.} =
let
transp = fromPipe(rfd)
conf = Chat2Conf.load()

# set log level
if conf.logLevel != LogLevel.NONE:
setLogLevel(conf.logLevel)
let transp = fromPipe(rfd)

let
conf = Chat2Conf.load()
(extIp, extTcpPort, extUdpPort) = setupNat(conf.nat, clientId,
Port(uint16(conf.tcpPort) + conf.portsShift),
Port(uint16(conf.udpPort) + conf.portsShift))
Expand Down
4 changes: 0 additions & 4 deletions apps/wakunode2/wakunode2.nim
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,6 @@ when isMainModule:
if conf.version:
echo "version / git commit hash: ", git_version
quit(QuitSuccess)

# set log level
if conf.logLevel != LogLevel.NONE:
setLogLevel(conf.logLevel)

var
node: WakuNode # This is the node we're going to setup using the conf
Expand Down
10 changes: 5 additions & 5 deletions waku.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ task test1, "Build & run Waku v1 tests":
### Waku v2 tasks
task wakunode2, "Build Waku v2 (experimental) cli node":
let name = "wakunode2"
buildBinary name, "apps/wakunode2/", "-d:chronicles_log_level=TRACE"
buildBinary name, "apps/wakunode2/", "-d:chronicles_log_level=DEBUG"

task bridge, "Build Waku v1 - v2 bridge":
let name = "wakubridge"
buildBinary name, "apps/wakubridge/", "-d:chronicles_log_level=TRACE"
buildBinary name, "apps/wakubridge/", "-d:chronicles_log_level=DEBUG"

task test2, "Build & run Waku v2 tests":
test "all_tests_v2"
Expand All @@ -96,14 +96,14 @@ task chat2, "Build example Waku v2 chat usage":
#buildBinary name, "examples/v2/", "-d:chronicles_log_level=WARN"

let name = "chat2"
buildBinary name, "apps/chat2/", "-d:chronicles_log_level=TRACE -d:chronicles_sinks=textlines[file] -d:ssl"
buildBinary name, "apps/chat2/", "-d:chronicles_log_level=DEBUG -d:chronicles_sinks=textlines[file] -d:ssl"

task chat2bridge, "Build chat2bridge":
let name = "chat2bridge"
buildBinary name, "apps/chat2bridge/", "-d:chronicles_log_level=TRACE"
buildBinary name, "apps/chat2bridge/", "-d:chronicles_log_level=DEBUG"


### Waku Tooling
task wakucanary, "Build waku-canary tool":
let name = "wakucanary"
buildBinary name, "tools/wakucanary/", "-d:chronicles_log_level=TRACE"
buildBinary name, "tools/wakucanary/", "-d:chronicles_log_level=DEBUG -d:chronicles_runtime_filtering:on"

0 comments on commit 6058636

Please sign in to comment.