Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
98d9df54
Commit
98d9df54
authored
Oct 14, 2014
by
Henry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove utils.PErr()
parent
2ed154bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
9 deletions
+3
-9
core/commands/refs.go
core/commands/refs.go
+1
-1
updates/updates.go
updates/updates.go
+1
-1
util/log.go
util/log.go
+1
-7
No files found.
core/commands/refs.go
View file @
98d9df54
...
...
@@ -43,7 +43,7 @@ func printRefs(n *core.IpfsNode, nd *mdag.Node, refSeen map[u.Key]bool, recursiv
if
recursive
{
nd
,
err
:=
n
.
DAG
.
Get
(
u
.
Key
(
link
.
Hash
))
if
err
!=
nil
{
u
.
PEr
r
(
"error: cannot retrieve %s (%s)
\n
"
,
link
.
Hash
.
B58String
(),
err
)
log
.
Erro
r
(
"error: cannot retrieve %s (%s)
\n
"
,
link
.
Hash
.
B58String
(),
err
)
return
}
...
...
updates/updates.go
View file @
98d9df54
...
...
@@ -37,7 +37,7 @@ func init() {
var
err
error
currentVersion
,
err
=
semver
.
NewVersion
(
Version
)
if
err
!=
nil
{
u
.
PEr
r
(
"The const Version literal in version.go needs to be in semver format: %s
\n
"
,
Version
)
log
.
Erro
r
(
"The const Version literal in version.go needs to be in semver format: %s
\n
"
,
Version
)
os
.
Exit
(
1
)
}
}
...
...
util/log.go
View file @
98d9df54
...
...
@@ -17,11 +17,6 @@ var LogFormat = "%{color}%{time:2006-01-02 15:04:05.999999} %{shortfile} %{level
// loggers is the set of loggers in the system
var
loggers
=
map
[
string
]
*
logging
.
Logger
{}
// PErr is a shorthand printing function to output to Stderr.
func
PErr
(
format
string
,
a
...
interface
{})
{
fmt
.
Fprintf
(
os
.
Stderr
,
format
,
a
...
)
}
// POut is a shorthand printing function to output to Stdout.
func
POut
(
format
string
,
a
...
interface
{})
{
fmt
.
Fprintf
(
os
.
Stdout
,
format
,
a
...
)
...
...
@@ -39,8 +34,7 @@ func SetupLogging() {
if
logenv
:=
os
.
Getenv
(
"IPFS_LOGGING"
);
logenv
!=
""
{
lvl
,
err
=
logging
.
LogLevel
(
logenv
)
if
err
!=
nil
{
PErr
(
"invalid logging level: %s
\n
"
,
logenv
)
PErr
(
"using logging.DEBUG
\n
"
)
log
.
Error
(
"invalid logging level: %s
\n
"
,
logenv
)
lvl
=
logging
.
DEBUG
}
}
...
...
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