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/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/genesis"
|
"github.com/getamis/istanbul-tools/genesis"
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type GenesisChart struct {
|
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"
|
"strings"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/common"
|
"github.com/getamis/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type StaticNodesChart struct {
|
type StaticNodesChart struct {
|
||||||
|
|
|
@ -20,8 +20,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExampleStartMining() {
|
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/crypto"
|
||||||
"github.com/ethereum/go-ethereum/p2p/discover"
|
"github.com/ethereum/go-ethereum/p2p/discover"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -35,7 +35,6 @@ import (
|
||||||
|
|
||||||
istcommon "github.com/getamis/istanbul-tools/common"
|
istcommon "github.com/getamis/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/genesis"
|
"github.com/getamis/istanbul-tools/genesis"
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -34,7 +34,6 @@ import (
|
||||||
"github.com/docker/go-connections/nat"
|
"github.com/docker/go-connections/nat"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/common"
|
"github.com/getamis/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
//TODO: refactor this with ethereum options?
|
//TODO: refactor this with ethereum options?
|
||||||
|
|
|
@ -22,8 +22,6 @@ import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (eth *ethereum) Image() string {
|
func (eth *ethereum) Image() string {
|
||||||
|
|
|
@ -45,7 +45,6 @@ import (
|
||||||
"github.com/getamis/istanbul-tools/client"
|
"github.com/getamis/istanbul-tools/client"
|
||||||
istcommon "github.com/getamis/istanbul-tools/common"
|
istcommon "github.com/getamis/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/genesis"
|
"github.com/getamis/istanbul-tools/genesis"
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
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"
|
||||||
"github.com/docker/docker/api/types/network"
|
"github.com/docker/docker/api/types/network"
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -31,7 +31,6 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/ethereum/go-ethereum/params"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/common"
|
"github.com/getamis/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
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/ethereum/go-ethereum/core"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/cmd/istanbul/extra"
|
"github.com/getamis/istanbul-tools/cmd/istanbul/extra"
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Option func(*core.Genesis)
|
type Option func(*core.Genesis)
|
||||||
|
|
|
@ -24,7 +24,6 @@ import (
|
||||||
"github.com/getamis/istanbul-tools/charts"
|
"github.com/getamis/istanbul-tools/charts"
|
||||||
istcommon "github.com/getamis/istanbul-tools/common"
|
istcommon "github.com/getamis/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/container"
|
"github.com/getamis/istanbul-tools/container"
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewBlockchain(numOfValidators int, gaslimit uint64, options ...Option) (bc *blockchain) {
|
func NewBlockchain(numOfValidators int, gaslimit uint64, options ...Option) (bc *blockchain) {
|
||||||
|
|
|
@ -18,8 +18,6 @@ package k8s
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExampleK8SBlockchain() {
|
func ExampleK8SBlockchain() {
|
||||||
|
|
|
@ -20,7 +20,6 @@ import (
|
||||||
"github.com/getamis/istanbul-tools/charts"
|
"github.com/getamis/istanbul-tools/charts"
|
||||||
"github.com/getamis/istanbul-tools/common"
|
"github.com/getamis/istanbul-tools/common"
|
||||||
"github.com/getamis/istanbul-tools/genesis"
|
"github.com/getamis/istanbul-tools/genesis"
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExampleK8SEthereum() {
|
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"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/client-go/kubernetes"
|
"k8s.io/client-go/kubernetes"
|
||||||
"k8s.io/client-go/tools/clientcmd"
|
"k8s.io/client-go/tools/clientcmd"
|
||||||
|
|
||||||
"github.com/getamis/istanbul-tools/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
20
log/log.go
20
log/log.go
|
@ -37,23 +37,3 @@ func init() {
|
||||||
func New(ctx ...interface{}) log15.Logger {
|
func New(ctx ...interface{}) log15.Logger {
|
||||||
return defaultLogger.New(ctx...)
|
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