Skip to content

logger is global, which leads to conflicts #17

@yegor256

Description

@yegor256

Currently, I have to do this (if I understand the API of the library correctly):

require 'jsonrpc/client'
require 'loog'
JSONRPC.logger = Loog::VERBOSE # instance of Logger class
c = JSONRPC::Client.new(url)
c.eth_call(...)

The configuration of the logger is global, while an instance of JSONRPC::Client is local. Making two instances of JSONRPC::Client in different places of the app leads to a question: which logger is used by which client? Obviously, it's not possible (or very inconvenient) to use different loggers for different clients. I suggest making logger a property of JSONRPC::Client, instead of being a property of the JSONRPC module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions