diff --git a/json_rpc/servers/httpserver.nim b/json_rpc/servers/httpserver.nim index b32ceb2..1354fba 100644 --- a/json_rpc/servers/httpserver.nim +++ b/json_rpc/servers/httpserver.nim @@ -1,4 +1,4 @@ -import json, strutils +import std/[json, strutils] import chronicles, httputils, chronos import ../server @@ -93,7 +93,7 @@ proc processClient(server: StreamServer, var header: HttpRequestHeader var connection: string - info "Received connection", address = $transp.remoteAddress() + debug "Received connection", address = $transp.remoteAddress() while true: try: let hlenfut = transp.readUntil(addr buffer[0], MaxHttpHeadersSize, @@ -206,13 +206,13 @@ proc processClient(server: StreamServer, await transp.closeWait() break - info "Finished connection", address = $transp.remoteAddress() + debug "Finished connection", address = $transp.remoteAddress() # Utility functions for setting up servers using stream transport addresses proc addStreamServer*(server: RpcHttpServer, address: TransportAddress) = try: - info "Creating server on ", address = $address + info "Starting JSON-RPC HTTP server", url = "http://" & $address var transServer = createStreamServer(address, processClient, {ReuseAddr}, udata = server) server.servers.add(transServer) diff --git a/json_rpc/servers/socketserver.nim b/json_rpc/servers/socketserver.nim index adc539e..cde2a89 100644 --- a/json_rpc/servers/socketserver.nim +++ b/json_rpc/servers/socketserver.nim @@ -1,5 +1,7 @@ import - json, json_serialization/std/net, + std/json, + chronicles, + json_serialization/std/net, ../server export server @@ -33,7 +35,7 @@ proc processClient(server: StreamServer, transport: StreamTransport) {.async, gc proc addStreamServer*(server: RpcSocketServer, address: TransportAddress) = try: - info "Creating server on ", address = $address + info "Starting JSON-RPC socket server", address = $address var transportServer = createStreamServer(address, processClient, {ReuseAddr}, udata = server) server.servers.add(transportServer) except CatchableError as exc: