Skip to content

Commit a387dd3

Browse files
aybabtmeAntoine Grondin
authored andcommitted
update readme
1 parent 92bf8cd commit a387dd3

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed

README.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,22 @@ Read logs from `stdin` and prints them back to `stdout`, but prettier.
44

55
# Using it
66

7-
[Grab a release](https://github.com/humanlogio/humanlog/releases) or :
8-
9-
## With Go installed
7+
## On macOS
108

119
```bash
12-
$ go install github.com/humanlogio/humanlog/cmd/humanlog@latest
10+
brew tap humanlogio/homebrew-tap
11+
brew install humanlog
1312
```
1413

15-
## On linux
14+
## On linux (and macOS)
1615

1716
```bash
18-
wget -qO- https://github.com/humanlogio/humanlog/releases/download/v0.6.2/humanlog_v0.6.2_linux_amd64.tar.gz | tar xvz
17+
curl -L "https://humanlog.io/install.sh" | sh
1918
```
2019

21-
## On OS X
20+
## Otherwise
2221

23-
```bash
24-
brew tap humanlogio/homebrew-tap
25-
brew install humanlog
26-
```
22+
[Grab a release](https://github.com/humanlogio/humanlog/releases)!
2723

2824
# Example
2925

@@ -36,15 +32,6 @@ $ humanlog < /var/log/logfile.log
3632

3733
![2__fish___users_antoine_gocode_src_github_com_humanlogio_humanlog__fish_](https://cloud.githubusercontent.com/assets/1189716/4328545/f2330bb4-3f86-11e4-8242-4f49f6ae9efc.png)
3834

39-
# Contributing
40-
41-
How to help:
42-
43-
- **support more log formats**: by submitting `human.Handler` implementations.
44-
- **live querying**: add support for filtering in log output in real time.
45-
- **charting**: some key-values have semantics that could be charted in real time. For
46-
instance, durations, frequency of numeric values, etc. See the [l2met][] project.
47-
4835
# Usage
4936

5037
```
@@ -61,6 +48,7 @@ AUTHOR:
6148
Antoine Grondin <[email protected]>
6249
6350
COMMANDS:
51+
version Interact with humanlog versions
6452
help, h Shows a list of commands or help for one command
6553
6654
GLOBAL OPTIONS:

cmd/humanlog/versions.go

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"context"
5+
"errors"
56
"fmt"
67
"log"
78
"net/http"
@@ -96,10 +97,12 @@ func versionCmd(
9697
getState func(cctx *cli.Context) *state.State,
9798
) cli.Command {
9899
return cli.Command{
99-
Name: versionCmdName,
100+
Name: versionCmdName,
101+
Usage: "Interact with humanlog versions",
100102
Subcommands: cli.Commands{
101103
{
102-
Name: "check",
104+
Name: "check",
105+
Usage: "checks whether a newer version is available",
103106
Action: func(cctx *cli.Context) error {
104107
ctx := getCtx(cctx)
105108
cfg := getCfg(cctx)
@@ -124,7 +127,8 @@ func versionCmd(
124127
},
125128
},
126129
{
127-
Name: "update",
130+
Name: "update",
131+
Usage: "self-update to the latest version",
128132
Action: func(cctx *cli.Context) error {
129133
ctx := getCtx(cctx)
130134
cfg := getCfg(cctx)
@@ -194,8 +198,11 @@ func asyncCheckForUpdate(ctx context.Context, req *checkForUpdateReq, cfg *confi
194198
defer close(out)
195199
nextVersion, _, hasUpdate, err := checkForUpdate(ctx, cfg, state)
196200
if err != nil {
197-
// TODO: log to diagnostic file
198-
log.Printf("failed to check for update")
201+
if errors.Is(errors.Unwrap(err), context.Canceled) {
202+
return
203+
}
204+
// TODO: log to diagnostic file?
205+
log.Printf("failed to check for update: %v", err)
199206
return
200207
}
201208
nexVersion, err := nextVersion.AsSemver()

0 commit comments

Comments
 (0)