main.go 552 Bytes
Newer Older
1 2 3
package main

import (
4 5
	"os"

6 7
	"github.com/ethereum/go-ethereum/log"

8 9 10 11 12 13 14
	"github.com/ethereum-optimism/optimism/op-program/client"
	oplog "github.com/ethereum-optimism/optimism/op-service/log"
)

func main() {
	// Default to a machine parsable but relatively human friendly log format.
	// Don't do anything fancy to detect if color output is supported.
15
	logger := oplog.NewLogger(os.Stdout, oplog.CLIConfig{
16 17
		Level:  log.LvlInfo,
		Format: oplog.FormatLogFmt,
18 19
		Color:  false,
	})
20
	oplog.SetGlobalLogHandler(logger.GetHandler())
21 22
	client.Main(logger)
}