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
08af98d4
Commit
08af98d4
authored
10 years ago
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logging friendliness
parent
5d9b1f8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
peer/peer.go
peer/peer.go
+1
-1
util/log.go
util/log.go
+1
-1
No files found.
peer/peer.go
View file @
08af98d4
...
...
@@ -65,7 +65,7 @@ type Peer struct {
// String prints out the peer.
func
(
p
*
Peer
)
String
()
string
{
return
"[Peer "
+
p
.
ID
.
String
()
+
"]"
return
"[Peer "
+
p
.
ID
.
String
()
[
:
12
]
+
"]"
}
// Key returns the ID as a Key (string) for maps.
...
...
This diff is collapsed.
Click to expand it.
util/log.go
View file @
08af98d4
...
...
@@ -18,7 +18,7 @@ var ansiGray = "\033[0;37m"
// LogFormats is a map of formats used for our logger, keyed by name.
var
LogFormats
=
map
[
string
]
string
{
"default"
:
"%{color}%{time:2006-01-02 15:04:05.999999} %{level} %{shortfile}: %{color:reset}%{message}"
,
"color"
:
ansiGray
+
"%{time:15:04:05.999} %{color}%{level} "
+
ansiGray
+
"%{shortfile}
:
%{color:reset}
%{message}
"
,
"color"
:
ansiGray
+
"%{time:15:04:05.999} %{color}%{level}
: %{color:reset}%{message}
"
+
ansiGray
+
"%{shortfile}%{color:reset}"
,
}
// Logging environment variables
...
...
This diff is collapsed.
Click to expand it.
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