Socket
Socket
Sign inDemoInstall

logless-client

Package Overview
Dependencies
1
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    logless-client

logless client for bespoken tools


Version published
Weekly downloads
406
decreased by-9.58%
Maintainers
2
Install size
64.4 kB
Created
Weekly downloads
 

Readme

Source

CircleCI codecov npm

logless-client

Logless will automatically capture logs and diagnostics for your Node.js Lambda, Google Cloud Function or Express.js service.

Before you integrate the code, you will need to a key. You get it from the Bespoken Dashboard. Once integrated, this is where your logs and data will be viewable.

Install the dependency


    $npm install logless-client --save

To use it with Lambdas, simply wrap your function handler, like so:


    var client = require('logless-client');

    const skillBuilder = Alexa.SkillBuilders.custom();

    exports.handler = client.Logless.capture("<SECRET_KEY>", skillBuilder
        .addRequestHandlers(
            // Lambda request handlers goes here
        )
        .lambda());

To use it with Google Cloud Functions, simply wrap your function handler:


    var client = require('logless-client');

    exports.hello = client.Logless.capture("<SECRET_KEY>", function (request, response) {
        // Cloud Function code goes here
        response.json({ foo: "bar" });
    });

To use it with Express.js, simply configure it with your routes:


    var client = require('logless-client');

    var logless = client.Logless.middleware("<SECRET_KEY>");
    app = express();

    app.use(bodyParser.json());
    app.use(logless.requestHandler);

    // Application handlers and routers registered here
    app.post("/", function {
        ...
    });

    // The Logless error handler must be registered last
    app.use(logless.errorHandler);

That's all there is to it. Then you can see all your logs through our handy dashboard!

We will effortlessly capture and format:

  • Request and response payloads
  • Console output (including instrumentation for timing and all debug levels)
  • Error and stack traces

FAQs

Last updated on 08 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc