Comments (4)
Hi @jakeleventhal,
Winston is supported. I didn't realise you wanted this feature for browser logging.
Being able to log to console instead of Better Stack sounds very useful.
I'm adding the feature to our internal task tracking. I will keep you updated here when we make progress on it.
Thanks a lot for the suggestion. 🙏
from logtail-js.
Hi @jakeleventhal,
Thanks for reaching out.
I would recommend using Pino with Better Stack Pino transport and pino-pretty.
You could select the right transport based on some ENV variable.
Here's how to configure Pino with Better Stack Pino transport: https://betterstack.com/docs/logs/javascript/pino/
Pino-pretty docs: https://github.com/pinojs/pino-pretty#programmatic-integration
And here's an example with multiple Pino destinations: https://betterstack.com/community/guides/logging/how-to-install-setup-and-use-pino-to-log-node-js-applications/#logging-to-multiple-destinations-in-pino
Let me know if this would work for you. 🙏
from logtail-js.
I use winston for all my logging, but when i log in the browser, i need to use @logtial/next
. If i use winston with logtail transports, it doesnt work properly. Is winston not a recommended logging tool? i see it in the docs
from logtail-js.
Hello @jakeleventhal,
since release v0.4.3
you can use options sendLogsToBetterStack
and sendLogsToConsoleOutput
to control where the logs should be sent.
By default, sendLogsToBetterStack: true, sendLogsToConsoleOutput: false
is set. See #67 for details.
Hope that solves your issue 🙂 If not, or you have any question, don't hesitate to reopen it 🙏
from logtail-js.
Related Issues (20)
- logging a lot of data quickly causes a ton of errors HOT 4
- Flutter support? HOT 1
- Unable to catch Forbidden error HOT 1
- automatic capture of console logging calls, e.g. `console.log` HOT 1
- @logtail/pino in nextjs HOT 3
- Invalid peer dependency specified in logtail/winston package HOT 2
- Unauthorized error on logs HOT 4
- Error logging with 0.4.0 HOT 3
- `await logtail.flush()` hangs (does not properly resolve) in v0.4.0 HOT 3
- support for edge environments (Cloudflare Workers, Vercel Serverless, etc) HOT 7
- feature request: sourcemap support HOT 2
- Add ability to color log outputs HOT 6
- Logtail blocked by adblocker HOT 3
- MaxListenersExceededWarning: Possible EventEmitter memory leak detected. HOT 4
- Logtail fails gh-action workflows on a javascript boilerplate HOT 3
- Disable @logtail/edge's warning about missing executionCtx when the runtime is not Cloudflare HOT 5
- Improve `context.runtime.file` when `logtail` is called indirectly HOT 4
- Use serialize-error library to seralize errors instead of manually creating an object HOT 5
- React Native support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logtail-js.