mirror of
https://github.com/luxfi/geth.git
synced 2026-10-30 15:05:39 +00:00
Delete the old slog-based log package (format.go, handler.go, handler_glog.go, logger.go, root.go) which initialized with DiscardHandler — silently swallowing all log output including Crit messages before calling os.Exit(1). This caused the EVM plugin subprocess to die with no trace. Replace with a thin bridge package (log/log.go) that re-exports github.com/luxfi/log, ensuring: - All geth log.Crit/Fatal calls properly log to stderr before exiting - Default logger writes to stderr (not /dev/null) - slog.Handler shims for backward compatibility Also rewrite all 249 source files to import luxfi/log directly.
27 lines
518 B
Go
27 lines
518 B
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package factory
|
|
|
|
import (
|
|
"github.com/luxfi/geth/plugin/evm"
|
|
"github.com/luxfi/ids"
|
|
log "github.com/luxfi/log"
|
|
"github.com/luxfi/vm/chain"
|
|
)
|
|
|
|
var (
|
|
// ID this VM should be referenced by
|
|
ID = ids.ID{'e', 'v', 'm'}
|
|
)
|
|
|
|
type Factory struct{}
|
|
|
|
func (*Factory) New(logger log.Logger) (interface{}, error) {
|
|
return &evm.VM{}, nil
|
|
}
|
|
|
|
func NewPluginVM() chain.ChainVM {
|
|
return &evm.VM{IsPlugin: true}
|
|
}
|