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
68b2a3f1
Commit
68b2a3f1
authored
Jan 23, 2015
by
Matt Bell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/commands: Renamed 'log read' to 'log tail'
parent
81d17e08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
core/commands/log.go
core/commands/log.go
+6
-7
No files found.
core/commands/log.go
View file @
68b2a3f1
...
...
@@ -5,9 +5,10 @@ import (
"io"
"strings"
tail
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/ActiveState/tail"
cmds
"github.com/jbenet/go-ipfs/commands"
u
"github.com/jbenet/go-ipfs/util"
tail
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/ActiveState/tail"
)
// Golang os.Args overrides * and replaces the character argument with
...
...
@@ -27,7 +28,7 @@ output of a running daemon.
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"level"
:
logLevelCmd
,
"
read
"
:
log
Read
Cmd
,
"
tail
"
:
log
Tail
Cmd
,
},
}
...
...
@@ -69,14 +70,11 @@ output of a running daemon.
Type
:
MessageOutput
{},
}
var
log
Read
Cmd
=
&
cmds
.
Command
{
var
log
Tail
Cmd
=
&
cmds
.
Command
{
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Read the logs"
,
ShortDescription
:
`
'ipfs log read' is a utility command used to read the log output.
By default, the last 50 lines are returned. For more, use '-n=<number of lines>'.
Use '--stream' (or '-s') to stream the current output (in addition to the '-n' lines).
'ipfs log tail' is a utility command used to read log output as it is written.
`
,
},
...
...
@@ -98,6 +96,7 @@ Use '--stream' (or '-s') to stream the current output (in addition to the '-n' l
fmt
.
Println
(
err
.
Error
())
return
}
defer
t
.
Stop
()
for
line
:=
range
t
.
Lines
{
if
line
.
Err
!=
nil
{
...
...
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