Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
codenoid committed Jan 3, 2021
1 parent 74ba204 commit 8b22620
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ go get github.com/codenoid/telelog
CLI version

```bash
go get github.com/codenoid/telelog/telelog
go get github.com/codenoid/telelog/cmd/telelog
```

## Usage
Expand Down Expand Up @@ -70,10 +70,12 @@ func main() {
// default TELELOG_RECIPIENT_LIST (single path to file), unless you call SetRecipient
logger.SetRecipient("/path/to/text/file.txt", "/second/file/that/contain/chat_id.txt")

err := logger.Connect()
if err != nil {
panic(err)
}
// or reader
f, _ := os.Open("file.txt")
logger.SetRecipientFromReader(f)

// or []byte
logger.SetRecipientFromByte([]byte{"777000\n"})

logger.Warn("Warning! your app will be error")
logger.Error("yo, this is error, in 2sec your app will dead")
Expand Down

0 comments on commit 8b22620

Please sign in to comment.