Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

log, network, storage, testutil: Log base address only in tests #2015

Merged
merged 3 commits into from
Dec 5, 2019

Conversation

pradovic
Copy link
Contributor

@pradovic pradovic commented Dec 4, 2019

Logging of base address is useful in tests and not so much in the production. This is one way of implementing this functionality without big changes to the code base.

The base address logging is enabled in testutil/init, however we could also do it with the init fuction of a separate test file, flag testutil, or custom build tags if it is more preferable.

@pradovic pradovic self-assigned this Dec 4, 2019
@pradovic pradovic changed the title Log base address only in tests log, network. storage, testutil: Log base address only in tests Dec 4, 2019
@pradovic pradovic changed the title log, network. storage, testutil: Log base address only in tests log, network, storage, testutil: Log base address only in tests Dec 4, 2019
@pradovic pradovic changed the base branch from oaddr-logs-improve to master December 4, 2019 13:00
@pradovic pradovic changed the base branch from master to oaddr-logs-improve December 4, 2019 13:03
@pradovic pradovic changed the base branch from oaddr-logs-improve to master December 4, 2019 13:04
// Export go-ethereum/log interface so that swarm/log can be used with it interchangeably
type Logger = l.Logger

func NewBaseAddressLogger(baseAddr string, ctx ...interface{}) l.Logger {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment exported functions.

@zelig zelig merged commit 4055441 into master Dec 5, 2019
@pradovic pradovic deleted the logs-base-test branch December 5, 2019 10:52
@acud acud added this to the 0.5.5 milestone Jan 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants