https://github.com/boly38/logtailsample
logtail example project - https://logtail.com/
https://github.com/boly38/logtailsample
Last synced: 4 months ago
JSON representation
logtail example project - https://logtail.com/
- Host: GitHub
- URL: https://github.com/boly38/logtailsample
- Owner: boly38
- Created: 2022-10-14T18:42:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-21T20:04:02.000Z (over 2 years ago)
- Last Synced: 2024-12-31T20:16:08.088Z (6 months ago)
- Language: JavaScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# logtailSample
This sample is used as HowTo reproduce logtail behaviors.
## Setup (one time only)
Setup your logtail secret:
```bash
export CH_LOGTAIL_SOURCE=blahblahblah
```## Normal use
Try classic usage
```bash
node index.js
```This works! you could see the result in your https://logtail.com/ `Live tail` :
## Mocha use case
To do a test with mocha test framework with `@logtail/node` or `@logtail/js`.
```bash
npm run test
```2 `Live tail` additional entries added.
## Circular reference use case
To do a test with circular reference as context object ([issue #19](https://github.com/logtail/logtail-js/issues/19))
```bash
node tests/logtailNode_MaxStackIssue.js
```- A first entry is well sent with a simple json object.
- A Second entry produces `RangeError: Maximum call stack size exceeded` issue: log is NOT sent.