Giter VIP home page Giter VIP logo

Comments (4)

curusarn avatar curusarn commented on May 28, 2024 1

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.

curusarn avatar curusarn commented on May 28, 2024

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.

jakeleventhal avatar jakeleventhal commented on May 28, 2024

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.

PetrHeinz avatar PetrHeinz commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.