Browse Source

filelogger -> stdinwriter

pull/102/head
Jae Kwon 10 years ago
parent
commit
0a8fb72a08
5 changed files with 15 additions and 15 deletions
  1. +3
    -3
      Makefile
  2. +0
    -6
      cmd/filelogger/README.md
  3. +6
    -0
      cmd/stdinwriter/README.md
  4. +5
    -5
      cmd/stdinwriter/main.go
  5. +1
    -1
      scripts/unsafe_upgrade_barak.sh

+ 3
- 3
Makefile View File

@ -6,19 +6,19 @@ install:
go install github.com/tendermint/tendermint/cmd/tendermint go install github.com/tendermint/tendermint/cmd/tendermint
go install github.com/tendermint/tendermint/cmd/barak go install github.com/tendermint/tendermint/cmd/barak
go install github.com/tendermint/tendermint/cmd/debora go install github.com/tendermint/tendermint/cmd/debora
go install github.com/tendermint/tendermint/cmd/filelogger
go install github.com/tendermint/tendermint/cmd/stdinwriter
build: build:
go build -o build/tendermint github.com/tendermint/tendermint/cmd/tendermint go build -o build/tendermint github.com/tendermint/tendermint/cmd/tendermint
go build -o build/barak github.com/tendermint/tendermint/cmd/barak go build -o build/barak github.com/tendermint/tendermint/cmd/barak
go build -o build/debora github.com/tendermint/tendermint/cmd/debora go build -o build/debora github.com/tendermint/tendermint/cmd/debora
go build -o build/filelogger github.com/tendermint/tendermint/cmd/filelogger
go build -o build/stdinwriter github.com/tendermint/tendermint/cmd/stdinwriter
build_race: build_race:
go build -race -o build/tendermint github.com/tendermint/tendermint/cmd/tendermint go build -race -o build/tendermint github.com/tendermint/tendermint/cmd/tendermint
go build -race -o build/barak github.com/tendermint/tendermint/cmd/barak go build -race -o build/barak github.com/tendermint/tendermint/cmd/barak
go build -race -o build/debora github.com/tendermint/tendermint/cmd/debora go build -race -o build/debora github.com/tendermint/tendermint/cmd/debora
go build -race -o build/filelogger github.com/tendermint/tendermint/cmd/filelogger
go build -race -o build/stdinwriter github.com/tendermint/tendermint/cmd/stdinwriter
test: build test: build
go test github.com/tendermint/tendermint/... go test github.com/tendermint/tendermint/...


+ 0
- 6
cmd/filelogger/README.md View File

@ -1,6 +0,0 @@
filelogger reads from stdin and writes to the specified file, in a way compatible for logrotate to move around.
(see tendermint/common/os#AutoFile)
```bash
some_command arg1 arg2 2>&1 | filelogger -o path_to_log.log
```

+ 6
- 0
cmd/stdinwriter/README.md View File

@ -0,0 +1,6 @@
stdinwriter reads from stdin and writes to the specified file, in a way compatible for logrotate to move around.
(see tendermint/common/os#AutoFile)
```bash
some_command arg1 arg2 2>&1 | stdinwriter -o path_to_log.log
```

cmd/filelogger/main.go → cmd/stdinwriter/main.go View File


+ 1
- 1
scripts/unsafe_upgrade_barak.sh View File

@ -7,7 +7,7 @@ sleep 10
debora --group default.upgrade close "[::]:46660" debora --group default.upgrade close "[::]:46660"
debora --group default.upgrade run -- bash -c "cd \$GOPATH/src/github.com/tendermint/tendermint; git pull origin develop; make" debora --group default.upgrade run -- bash -c "cd \$GOPATH/src/github.com/tendermint/tendermint; git pull origin develop; make"
debora --group default.upgrade run -- bash -c "cd \$GOPATH/src/github.com/tendermint/tendermint; mkdir -p ~/.barak/logs" debora --group default.upgrade run -- bash -c "cd \$GOPATH/src/github.com/tendermint/tendermint; mkdir -p ~/.barak/logs"
debora --group default.upgrade run --bg --label barak -- bash -c "cd \$GOPATH/src/github.com/tendermint/tendermint; barak --options-file=cmd/barak/seed0 | filelogger -outpath ~/.barak/logs/barak.log"
debora --group default.upgrade run --bg --label barak -- bash -c "cd \$GOPATH/src/github.com/tendermint/tendermint; barak --options-file=cmd/barak/seed0 | stdinwriter -outpath ~/.barak/logs/barak.log"
echo "Testing new barak..." echo "Testing new barak..."
debora list debora list
sleep 10 sleep 10


Loading…
Cancel
Save