[Vuejs]-How to log errors in VueJS project, deployed on nginx docker image?

0๐Ÿ‘

I have used a 3rd party logging service like Loggly to do this. Create an account, and then you can use https://www.npmjs.com/package/loggly to setup a connection:

  var loggly = require('loggly');

  var client = loggly.createClient({
    token: "your-really-long-input-token",
    subdomain: "your-subdomain",
    auth: {
      username: "your-username",
      password: "your-password"
    }
  });

And then you simply log like this:

  client.log('127.0.0.1 - oops i did it again');

You then log into their service to see the log and a bunch of tools for analysis.

There are other logging services like Logzio, etc.

๐Ÿ‘คEd Pfromer

Leave a comment