Skip to content

Provide an optional endpoint for logging Javascript errors #3976

Closed
@sdeleuze

Description

@sdeleuze

When you are building a Java + Javascript based application with a significant complexity on client side (Angular, Ember or React application), a big issue is that you have no idea of the errors that occur on client side.

A good solution I have already experimented on big projects is composed of 2 parts:

  • Client side: a Javascript file intercept invocations to functions like console.log() to send an HTTP request/websocket message to the server with the error
  • Server side: A REST/Websocket endpoint receive the error message (usually a JSON object), parse it and print it to the log with the same level (DEBUG, INFO, etc.) used on the client.

It should be possible to change the client log level you send to the server dynamically.

This is a little bit more a client/server integration thing than usual, but on the projects I tested that it was just hugely useful some I think we should provide this in Boot. I will be happy to contribute a PR if you think this is something interesting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions