mirror of
https://github.com/wahyd4/node-prune.git
synced 2026-08-09 05:06:18 +10:00
change to use cli logger
This commit is contained in:
@@ -11,7 +11,7 @@ $ go get github.com/tj/node-prune/cmd/node-prune
|
||||
```
|
||||
$ cd myapp
|
||||
$ node-prune
|
||||
INFO[0000] complete duration=195ms files_removed=1,222 files_total=25,520 size_removed=6.8 MB
|
||||
• complete duration=217ms files_removed=1,222 files_total=25,520 size_removed=6.8 MB
|
||||
```
|
||||
|
||||
## What?
|
||||
|
||||
@@ -5,14 +5,14 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/apex/log/handlers/text"
|
||||
"github.com/apex/log/handlers/cli"
|
||||
"github.com/dustin/go-humanize"
|
||||
|
||||
"github.com/tj/node-prune"
|
||||
)
|
||||
|
||||
func init() {
|
||||
log.SetHandler(text.Default)
|
||||
log.SetHandler(cli.Default)
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
Reference in New Issue
Block a user