Giter VIP home page Giter VIP logo

Comments (2)

jo-warren avatar jo-warren commented on May 28, 2024 1

from logtail-js.

gyfis avatar gyfis commented on May 28, 2024

Every line that's logged has an extra string added to it. Everything starting with the 9 and ending with the 48. How do I get rid of this? ` 2021-11-13 14:34:50.983 [qa] [INFO] 9 ../task/node_modules/@logtail/winston/dist/cjs/winston.js 48 --> POST /api/stripe

2021-11-13 14:34:51.219 [qa] [INFO] 9 ../task/node_modules/@logtail/winston/dist/cjs/winston.js 48 Processing Stripe Event: invoice.created. 2021-11-13 14:34:51.268 [qa] [INFO] 9 ../task/node_modules/@logtail/winston/dist/cjs/winston.js 48 <-- [204] POST /api/stripe 286ms `

These are the Winston options I have set: winston.createLogger({ level: 'debug', // change to info for prod? format: winston.format.combine( winston.format.colorize(), winston.format.align(), winston.format.splat(), winston.format.timestamp({ format: customTimeStamp() }), winston.format.printf(customFormat), winston.format.errors({ stack: true }), //winston.format.json() use for non-local? ) })

Custom format: const customFormat = log => { const pattern = /(error|warn|info|http|verbose|debug|silly)/s let level = log.level.match(pattern) if (level) { level = log.level.replace(pattern, level[0].toUpperCase()) } return log.stack ? ${log.timestamp} [${level}]: ${log.message}\n${log.stack}:${log.timestamp} [${level}]: ${log.message} }

Hi Jo (@jojobean13)! Thanks a lot for your question, and I'm sorry we didn't reply sooner. I believe what you describe here is the Live Tail section of Logtail. You can go to Sources -> advanced settings, and change the fields displayed there by modifying the Live Tail primary fields section of the settings. That should help! πŸ™Œ

EDIT: I'm closing the thread, but will keep watch - feel free to ping me here if you have any further questions!

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.