Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenLog #717

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions common/docker/docker_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ func (i *ImgDB) IsRunning() bool {
return i.running
}

// OpenLog open cmd log by this api.
func (i *ImgDB) OpenLog(open bool) {
i.cmd.OpenLog(open)
}

func (i *ImgDB) prepare() []string {
cmd := []string{"docker", "run", "--rm", "--name", i.name, "-p", fmt.Sprintf("%d:5432", i.port)}
envs := []string{
Expand Down
5 changes: 5 additions & 0 deletions common/docker/docker_geth.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ func (i *ImgGeth) ChainID() *big.Int {
return i.chainID
}

// OpenLog open cmd log by this api.
func (i *ImgGeth) OpenLog(open bool) {
i.cmd.OpenLog(open)
}

func (i *ImgGeth) isOk() bool {
keyword := "WebSocket enabled"
okCh := make(chan struct{}, 1)
Expand Down
1 change: 1 addition & 0 deletions common/docker/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type ImgInstance interface {
Stop() error
Endpoint() string
IsRunning() bool
OpenLog(bool)
}

// GethImgInstance based on ImgInstance and add chainID interface.
Expand Down