charts, client, common, container, genesis, k8s, log: logger refactoing for correct caller line number
This commit is contained in:
parent
2950c03765
commit
d6ea5008a2
|
@ -25,7 +25,6 @@ import (
|
|||
"github.com/ethereum/go-ethereum/common"
|
||||
|
||||
"github.com/getamis/istanbul-tools/genesis"
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
type GenesisChart struct {
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2017 AMIS Technologies
|
||||
// This file is part of the go-ethereum library.
|
||||
//
|
||||
// The go-ethereum library is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// The go-ethereum library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package charts
|
||||
|
||||
import (
|
||||
logging "github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
var log = logging.New()
|
|
@ -23,7 +23,6 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/getamis/istanbul-tools/common"
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
type StaticNodesChart struct {
|
||||
|
|
|
@ -20,8 +20,6 @@ import (
|
|||
"context"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
func ExampleStartMining() {
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2017 AMIS Technologies
|
||||
// This file is part of the go-ethereum library.
|
||||
//
|
||||
// The go-ethereum library is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// The go-ethereum library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
logging "github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
var log = logging.New()
|
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2017 AMIS Technologies
|
||||
// This file is part of the go-ethereum library.
|
||||
//
|
||||
// The go-ethereum library is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// The go-ethereum library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package common
|
||||
|
||||
import (
|
||||
logging "github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
var log = logging.New()
|
|
@ -31,8 +31,6 @@ import (
|
|||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/p2p/discover"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -35,7 +35,6 @@ import (
|
|||
|
||||
istcommon "github.com/getamis/istanbul-tools/common"
|
||||
"github.com/getamis/istanbul-tools/genesis"
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -34,7 +34,6 @@ import (
|
|||
"github.com/docker/go-connections/nat"
|
||||
|
||||
"github.com/getamis/istanbul-tools/common"
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
//TODO: refactor this with ethereum options?
|
||||
|
|
|
@ -22,8 +22,6 @@ import (
|
|||
"os"
|
||||
|
||||
"github.com/docker/docker/client"
|
||||
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
func (eth *ethereum) Image() string {
|
||||
|
|
|
@ -45,7 +45,6 @@ import (
|
|||
"github.com/getamis/istanbul-tools/client"
|
||||
istcommon "github.com/getamis/istanbul-tools/common"
|
||||
"github.com/getamis/istanbul-tools/genesis"
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2017 AMIS Technologies
|
||||
// This file is part of the go-ethereum library.
|
||||
//
|
||||
// The go-ethereum library is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// The go-ethereum library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package container
|
||||
|
||||
import (
|
||||
logging "github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
var log = logging.New()
|
|
@ -26,8 +26,6 @@ import (
|
|||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/network"
|
||||
"github.com/docker/docker/client"
|
||||
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -31,7 +31,6 @@ import (
|
|||
"github.com/ethereum/go-ethereum/params"
|
||||
|
||||
"github.com/getamis/istanbul-tools/common"
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2017 AMIS Technologies
|
||||
// This file is part of the go-ethereum library.
|
||||
//
|
||||
// The go-ethereum library is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// The go-ethereum library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package genesis
|
||||
|
||||
import (
|
||||
logging "github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
var log = logging.New()
|
|
@ -24,7 +24,6 @@ import (
|
|||
"github.com/ethereum/go-ethereum/core"
|
||||
|
||||
"github.com/getamis/istanbul-tools/cmd/istanbul/extra"
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
type Option func(*core.Genesis)
|
||||
|
|
|
@ -24,7 +24,6 @@ import (
|
|||
"github.com/getamis/istanbul-tools/charts"
|
||||
istcommon "github.com/getamis/istanbul-tools/common"
|
||||
"github.com/getamis/istanbul-tools/container"
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
func NewBlockchain(numOfValidators int, gaslimit uint64, options ...Option) (bc *blockchain) {
|
||||
|
|
|
@ -18,8 +18,6 @@ package k8s
|
|||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
func ExampleK8SBlockchain() {
|
||||
|
|
|
@ -20,7 +20,6 @@ import (
|
|||
"github.com/getamis/istanbul-tools/charts"
|
||||
"github.com/getamis/istanbul-tools/common"
|
||||
"github.com/getamis/istanbul-tools/genesis"
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
func ExampleK8SEthereum() {
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2017 AMIS Technologies
|
||||
// This file is part of the go-ethereum library.
|
||||
//
|
||||
// The go-ethereum library is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// The go-ethereum library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package k8s
|
||||
|
||||
import (
|
||||
logging "github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
var log = logging.New()
|
|
@ -25,8 +25,6 @@ import (
|
|||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
|
||||
"github.com/getamis/istanbul-tools/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
20
log/log.go
20
log/log.go
|
@ -37,23 +37,3 @@ func init() {
|
|||
func New(ctx ...interface{}) log15.Logger {
|
||||
return defaultLogger.New(ctx...)
|
||||
}
|
||||
|
||||
func Info(msg string, ctx ...interface{}) {
|
||||
defaultLogger.Info(msg, ctx...)
|
||||
}
|
||||
|
||||
func Debug(msg string, ctx ...interface{}) {
|
||||
defaultLogger.Debug(msg, ctx...)
|
||||
}
|
||||
|
||||
func Warn(msg string, ctx ...interface{}) {
|
||||
defaultLogger.Warn(msg, ctx)
|
||||
}
|
||||
|
||||
func Error(msg string, ctx ...interface{}) {
|
||||
defaultLogger.Error(msg, ctx...)
|
||||
}
|
||||
|
||||
func Fatal(msg string, ctx ...interface{}) {
|
||||
defaultLogger.Crit(msg, ctx...)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue