Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
e287b56b
Commit
e287b56b
authored
Jan 26, 2016
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logger/glog: clean up flag getters
parent
a411fe7e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
glog.go
logger/glog/glog.go
+10
-8
No files found.
logger/glog/glog.go
View file @
e287b56b
...
...
@@ -138,25 +138,28 @@ func SetV(v int) {
logging
.
verbosity
.
set
(
Level
(
v
))
}
// SetVmodule sets the global verbosity patterns.
func
SetVmodule
(
pat
string
)
error
{
return
logging
.
vmodule
.
Set
(
pat
)
}
// SetToStderr sets the global output style
func
SetToStderr
(
toStderr
bool
)
{
logging
.
mu
.
Lock
()
logging
.
toStderr
=
toStderr
logging
.
mu
.
Unlock
()
}
// GetTraceLocation returns the global TraceLocation
object
// GetTraceLocation returns the global TraceLocation
flag.
func
GetTraceLocation
()
*
TraceLocation
{
return
&
logging
.
traceLocation
}
// GetVModule returns the global verbosity pattern flag.
func
GetVModule
()
*
moduleSpec
{
return
&
logging
.
vmodule
}
// GetVerbosity returns the global verbosity level flag.
func
GetVerbosity
()
*
Level
{
return
&
logging
.
verbosity
}
// get returns the value of the severity.
func
(
s
*
severity
)
get
()
severity
{
return
severity
(
atomic
.
LoadInt32
((
*
int32
)(
s
)))
...
...
@@ -453,8 +456,7 @@ func init() {
// Default stderrThreshold is ERROR.
logging
.
stderrThreshold
=
errorLog
logging
.
setVState
(
0
,
nil
,
false
)
logging
.
setVState
(
3
,
nil
,
false
)
go
logging
.
flushDaemon
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment