good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
a983a215
Commit
a983a215
authored
Mar 23, 2015
by
Viktor Trón
Browse files
Options
Downloads
Patches
Plain Diff
fix ethtest logging
parent
9880f99c
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmd/ethtest/main.go
+4
-5
4 additions, 5 deletions
cmd/ethtest/main.go
logger/logsystem.go
+6
-6
6 additions, 6 deletions
logger/logsystem.go
tests/helper/init.go
+1
-1
1 addition, 1 deletion
tests/helper/init.go
with
11 additions
and
12 deletions
cmd/ethtest/main.go
+
4
−
5
View file @
a983a215
...
...
@@ -33,12 +33,12 @@ import (
"strings"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/tests/helper"
"github.com/ethereum/go-ethereum/core/vm"
)
type
Log
struct
{
...
...
@@ -81,7 +81,6 @@ func StateObjectFromAccount(db common.Database, addr string, account Account) *s
type
VmTest
struct
{
Callcreates
interface
{}
//Env map[string]string
Env
Env
Exec
map
[
string
]
string
Transaction
map
[
string
]
string
...
...
@@ -219,7 +218,7 @@ func RunVmTest(r io.Reader) (failed int) {
}
func
main
()
{
//
helper.Logger.SetLogLevel(5)
helper
.
Logger
.
SetLogLevel
(
5
)
vm
.
Debug
=
true
if
len
(
os
.
Args
)
>
1
{
...
...
This diff is collapsed.
Click to expand it.
logger/logsystem.go
+
6
−
6
View file @
a983a215
...
...
@@ -14,17 +14,17 @@ type LogSystem interface {
// NewStdLogSystem creates a LogSystem that prints to the given writer.
// The flag values are defined package log.
func
NewStdLogSystem
(
writer
io
.
Writer
,
flags
int
,
level
LogLevel
)
LogSystem
{
func
NewStdLogSystem
(
writer
io
.
Writer
,
flags
int
,
level
LogLevel
)
*
Std
LogSystem
{
logger
:=
log
.
New
(
writer
,
""
,
flags
)
return
&
s
tdLogSystem
{
logger
,
uint32
(
level
)}
return
&
S
tdLogSystem
{
logger
,
uint32
(
level
)}
}
type
s
tdLogSystem
struct
{
type
S
tdLogSystem
struct
{
logger
*
log
.
Logger
level
uint32
}
func
(
t
*
s
tdLogSystem
)
LogPrint
(
msg
LogMsg
)
{
func
(
t
*
S
tdLogSystem
)
LogPrint
(
msg
LogMsg
)
{
stdmsg
,
ok
:=
msg
.
(
stdMsg
)
if
ok
{
if
t
.
GetLogLevel
()
>=
stdmsg
.
Level
()
{
...
...
@@ -33,11 +33,11 @@ func (t *stdLogSystem) LogPrint(msg LogMsg) {
}
}
func
(
t
*
s
tdLogSystem
)
SetLogLevel
(
i
LogLevel
)
{
func
(
t
*
S
tdLogSystem
)
SetLogLevel
(
i
LogLevel
)
{
atomic
.
StoreUint32
(
&
t
.
level
,
uint32
(
i
))
}
func
(
t
*
s
tdLogSystem
)
GetLogLevel
()
LogLevel
{
func
(
t
*
S
tdLogSystem
)
GetLogLevel
()
LogLevel
{
return
LogLevel
(
atomic
.
LoadUint32
(
&
t
.
level
))
}
...
...
This diff is collapsed.
Click to expand it.
tests/helper/init.go
+
1
−
1
View file @
a983a215
...
...
@@ -7,7 +7,7 @@ import (
logpkg
"github.com/ethereum/go-ethereum/logger"
)
var
Logger
logpkg
.
LogSystem
var
Logger
*
logpkg
.
Std
LogSystem
var
Log
=
logpkg
.
NewLogger
(
"TEST"
)
func
init
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment