Skip to content

Commit

Permalink
chore(inabox): multiplex inabox logs to stdout to help debug easier (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf authored Sep 9, 2024
1 parent 2c75d5d commit c2f1d39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inabox/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package deploy
import (
"encoding/json"
"fmt"
"io"
"log"
"math/big"
"os"
Expand Down Expand Up @@ -126,7 +127,7 @@ func (env *Config) DeployExperiment() {
log.Panicf("error opening file: %v", err)
}
defer f.Close()
log.SetOutput(f)
log.SetOutput(io.MultiWriter(os.Stdout, f))

// Create a new experiment and deploy the contracts

Expand Down
1 change: 1 addition & 0 deletions inabox/deploy/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ func execForgeScript(script, privateKey string, deployer *ContractDeployer, extr
cmd.Stdout = &out
cmd.Stderr = &stderr

log.Println("Executing forge script with command: ", cmd.String())
err := cmd.Run()
if err != nil {
log.Print(fmt.Sprint(err) + ": " + stderr.String())
Expand Down

0 comments on commit c2f1d39

Please sign in to comment.