2bbfe4d56f
debug(core, datastore, daemon) wrap errors
...
@jbenet @whyrusleeping @mappum
very helpful for tracking down errors. the stack traces are only
shown when debug mode is visible. They function best when caught at the
source.
I propose we use this errors package as a drop-in replacement for
fmt.Errorf and errors.New in all of our code, and use errors.Wrap for
external errors as they emerge from others' libraries.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-17 22:36:18 -08:00
d0a3f9ba9a
feat(2/init) expose init with defaults
...
will support daemon initialization
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-17 22:36:18 -08:00
6a380ff532
refactor(2/init) use util.FileExists
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-17 22:36:18 -08:00
c883f7dc36
refactor(2/init) extract const
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-17 22:36:18 -08:00
81f5d6fd5f
debug(2/ipfs) make cmdDetails loggable
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-17 22:36:17 -08:00
aba4b2bde4
feat(eventlog) initialize event logger with silent defaults
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-17 22:36:17 -08:00
bacf3ecc6a
feat(util) add datastore Closer Wrapper
...
@jbenet
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-17 22:36:17 -08:00
45cc33b1ff
Merge pull request #354 from chriscool/improve_help_messages
...
Improve help messages
2014-11-17 14:25:39 -08:00
288ee753c0
Remove 'SYNOPSIS' from short help text
...
It takes some space and it looks like it
applies to the description too.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2014-11-17 21:08:56 +01:00
7d2f3d810c
fix tabbing
2014-11-17 11:57:57 -08:00
4588732af3
address comments from PR
2014-11-17 10:27:41 -08:00
e621aebca5
Merge pull request #356 from jbenet/fix/option-cast
...
Fix Option Validation
2014-11-17 01:29:12 -08:00
f26388e0e5
fix(core) tear-down leveldb
...
@jbenet @whyrusleeping @mappum
If we permit initialization in `ipfs daemon`, then we must ensure that
the node instantiated in `ipfs init` (to create the welcome file) shuts
down and releases resources.
Kept running into "resource temporarily unavailable". Discovered that it
was our cousins Jeff and Sanjay over at LevelDB Ave.
go-datastore doesn't expose Close() so I extended the TsDs interface and
submitted a patch.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-17 00:44:18 -08:00
ddb0189b90
refactor(eventlog) use polite formatter as a direct dependency
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-17 00:44:18 -08:00
884d629a56
deps(eventlog) no need to augment Logger
...
allow framework to add level to log so level can be applied when using
text formatter
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-17 00:44:18 -08:00
356a2d7faa
fix(daemon) if lock file does not exist, then the lock is not acquired
...
@mappum @jbenet LGTU?
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-17 00:44:18 -08:00
11fd2aa701
feat(util) FileExists
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-17 00:44:18 -08:00
cf8fb87df1
refactor(errors) debugerror -> errors
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-17 00:44:18 -08:00
5fa31f8e6c
deps(go-datastore) update
...
This commit updates go-datastore in order to access new LevelDb Close()
method
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-17 00:43:37 -08:00
abb8374d43
commands: NewRequest: Documented error case
2014-11-17 00:00:16 -08:00
3c5bfcec31
commands: Fixed tests
2014-11-16 18:07:56 -08:00
5e16dfb111
commands: Improved option conversin error message
2014-11-16 18:05:13 -08:00
d1c50972f5
commands: Check for option errors when constructing Requests
2014-11-16 18:01:06 -08:00
9f4127aefa
fix variable naming
2014-11-16 17:12:35 -08:00
0de12b5d36
implement ipfs id in the new commands library
2014-11-16 16:46:06 -08:00
46d8acf60f
Add missing 'mount' in mount synopsis
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2014-11-16 21:04:53 +01:00
5098e39203
Suggest use of ipfs daemon in mount help message
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2014-11-16 18:14:27 +01:00
4af3e0ff97
Merge pull request #326 from jbenet/feat/machine-readable-logging
...
feature: machine-readable logging
2014-11-16 08:39:53 -08:00
c4ea0b78ba
fix(2/init) msg
...
@jbenet i presume you prefer it without the period
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 08:28:08 -08:00
c8c062fe13
refactor(config/init) add hooks to identity generation. useful for displaying messages to the user
...
@jbenet this commit re-introduces the peer identity line. It's very
useful. I understand it may have been removed because of the clashing of
the IDs. To alleviate this, this commit places some negative space
between the two lines.
'to test' -> 'to get started' as a stronger call to action
```
λ. ipfs2 init -f
initializing ipfs node at /Users/btc/.go-ipfs
generating key pair...done.
peer identity: QmWzjxNEYKjDAxuHJqvtLP1dZTDjreBSUsArWoHai1v9yP
to get started, enter: ipfs cat QmYpv2VEsxzTTXRYX3PjDg961cnJE3kY1YDXLycHGQ3zZB
```
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 08:13:26 -08:00
1c4c7412b4
fix(misc) address PR comments
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:40:05 -08:00
6291c25455
fix(net/conn) Set peer to "Remote" in Dial method
...
@jbenet we may want to consider setting the default type to Remote. I
left the default as Unspecified just for safety.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:01:01 -08:00
0f6a2e2778
feat(eventlog) use the polite json formatter
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:01:01 -08:00
2d6b10f605
deps(eventlog) disable logrus' mutation of event keys
...
now, logrus does not automatically inject time, msg, level metadata
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:01:01 -08:00
b03fbf73f5
deps(eventlog) use maybebtc fork
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:01:01 -08:00
02d8da09ae
fix(2/init) message displayed during init
...
TODO use a writer to get the command output
resulting appearance:
```
go-ipfs (feat/machine-readable-logging) λ. make install_2; ipfs2 init -f
cd cmd/ipfs2 && go install
initializing ipfs node at /Users/btc/.go-ipfs
generating key pair...
peer identity: %s QmcPLgrqfvnneJ3vr3oGpkTiS9Psx8p3HxevjnoZYToDRm
```
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:01:01 -08:00
e906dcd862
refactor(eventlog) extract entry
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:01:01 -08:00
d5c3535ffb
misc(eventlog) run tests in parallel
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:01:01 -08:00
7b7a6d8c57
fix(eventlog) context
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:01:00 -08:00
43f74c82ac
feat(eventlog) entry
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:01:00 -08:00
6fec76d93e
fix(imports) misc
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:01:00 -08:00
c6a84884c9
todo(eventlog)
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:01:00 -08:00
2134365c48
docs(eventlog)
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:01:00 -08:00
25c98e8e61
refactor(eventlog) elog -> eventlog
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-16 07:01:00 -08:00
ac69aba561
feat(2/main) configure event logger
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-16 07:01:00 -08:00
be62b76516
refactor(2/main) use debugerror
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-16 07:01:00 -08:00
3a927cbcec
feat(init) init logs upon config initialization
...
TODO allow user dir override
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-16 07:01:00 -08:00
183dd990b6
feat(eventlog) include timestamp in log
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
2014-11-16 07:01:00 -08:00
bd51b82160
feat(eventlog) configuration/options
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
2014-11-16 07:01:00 -08:00
d28c9cc7b4
refactor(init) extract initCheckDir function
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)
2014-11-16 07:01:00 -08:00