chore: upgrade dependencies v0.22 (#2185)

This commit is contained in:
gabrielmer
2023-11-06 13:30:34 +02:00
committed by GitHub
parent fa467e2462
commit b9563ae0b5
16 changed files with 20 additions and 30 deletions
@@ -96,7 +96,8 @@ proc process*(self: ptr RelayRequest,
case self.operation:
of SUBSCRIBE:
node.wakuRelay.subscribe($self.pubsubTopic, self.relayEventCallback)
# TO DO: properly perform 'subscribe'
discard node.wakuRelay.subscribe($self.pubsubTopic, self.relayEventCallback)
of UNSUBSCRIBE:
# TODO: properly perform 'unsubscribe'
+1 -1
+4 -15
View File
@@ -6,28 +6,17 @@ import
chronicles/log_output,
chronicles/topics_registry
export chronicles.LogLevel
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
type
LogLevel* = enum
TRACE, DEBUG, INFO, NOTICE, WARN, ERROR, FATAL
LogFormat* = enum
TEXT, JSON
converter toChroniclesLogLevel(level: LogLevel): chronicles.LogLevel =
## Map logging log levels to the corresponding nim-chronicles' log level
try:
parseEnum[chronicles.LogLevel]($level)
except CatchableError:
chronicles.LogLevel.NONE
## Utils
proc stripAnsi(v: string): string =
@@ -82,12 +71,12 @@ proc setupLogLevel*(level: LogLevel) =
topics_registry.setLogLevel(level)
proc setupLogFormat*(format: LogFormat, color=true) =
proc noOutputWriter(logLevel: chronicles.LogLevel, msg: LogOutputStr) = discard
proc noOutputWriter(logLevel: LogLevel, msg: LogOutputStr) = discard
proc stdoutOutputWriter(logLevel: chronicles.LogLevel, msg: LogOutputStr) =
proc stdoutOutputWriter(logLevel: LogLevel, msg: LogOutputStr) =
writeAndFlush(io.stdout, msg)
proc stdoutNoColorOutputWriter(logLevel: chronicles.LogLevel, msg: LogOutputStr) =
proc stdoutNoColorOutputWriter(logLevel: LogLevel, msg: LogOutputStr) =
writeAndFlush(io.stdout, stripAnsi(msg))