npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@strangesecrets/web_log

v0.0.2

Published

Simple log capture library for JavaScript

Downloads

3

Readme

Strange Secrets Web Logging Module

This module can be used in the browser, it captures logged messages and sends them to a remote server for storage. It also captures unhandled errors and sends information to a remote server.

This module is still in early development.

Strange Secrets also provides a web-server that will receive information logged using this module. Captured errors are also stored within a database and tracked along with your task management system. For more information please visit the website at http://strange-secrets.com/red-line

Installation

The module may be installed into your web application using npm:

npm install --save @strangesecrets/web-log

Usage

You may import the library into your ES6+ project using:

import * as SSLog from '@strangesecrets/web-log'

The module includes typescript type definitions and may be immediately used with or without typescript.

If you are building with raw ES5 code without module support, you can include the ES5 source file "" within your build process, the API will be supplied using the SSLog variable.

Once imported you should initialize the module for use by your application using the configure method. The configure method accepts various options allowing you to customize the behaviour of the module.

SSLog.configure({
    ...options...
});

You may specify the following option data when invoking this method:

| Option | Description | | ----------- | --------------------------------------------------------------------------- | |uri | Web address endpoint of your logging server. |sendDelay | Frequency (in milliseconds) logging information will be sent to the server | |sendCapacity | Maximum number of queued logs to cache before sending to the server | |userName | Name of the user to be associated with the logged information | |userId | Identifier of the user to be associated with the logged information | |sessionId | Identifier of the current session to be associated with the logged information. | |version | Version identifier of the application | |systemLog | True if logged information should be output to the browser log otherwise false (defaults to true) | |console | True (default) to override standard console logging, if false console logging will not be captured. | |captureErrors| True (default) to capture unhandled exceptions, if false unhandled exceptions will not be logged.|

Only the uri of your logging server is required in order for data to be captured. Defaults are provided for other options that are omitted.

Once configured, the logging system will capture all console logs and send them to the specified server unless you have set the 'console' option to false in the configuration options.