Giter Site home page Giter Site logo

loglevel-serversend's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

loglevel-serversend's Issues

Error stack traces

Without stack traces, the logs are of limited use

Perhaps something like this should be the default:

if (message instanceof Error && message.stack) {
  message.stack;
} else if (message instanceof Error) {
  message.message;
} else if (message instanceof ErrorEvent && message.error) {
  message.error.stack;
} else if (message instanceof ErrorEvent) {
  message.message;
} else {
  message;
}

Need more updates!

Hey dude, commit something already! Don't be like those paranoids in Node.js! :D

Apply in TypeScript

Sometimes, when I want to use this plugin in typescript. It is unable to use to my project. Maybe the TypeScript implementation for this plugin can be considered to add. Thank you

Tests

Where are the tests?

Using the plugin

Hello,

I am completely new in using JavaScript and thus for me is not clear how to use this plugin. I already have loglevel in my project and a web server installed. I want to use loglevel-serverSend in a js file where I also use loglevel. How do I extend loglevel with the plugin? Do I need to change something in the code of loglevel.js? I tried this to the js file that I am using loglevel:

var log = require('loglevel');
log.setLevel('trace');
var log1 = require('loglevel-serverSend');
log1.info('unreasonably simple');
log12.loglevelServerSend(log1,{url: 'https://145.94.213.200/log ......

This gaves warning and errors in the loglevel-serverSend.js file.

Thank you

Structured logs

Add the ability to log JSON objects. (Currently the prefix method can handle the conversion, but the headers will be incorrect)

This may also be useful to combine with #3 so that information from errors (both message, stack trace, maybe line numbers, etc) can be sent in a structured way

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.