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

hypnolog-server

v0.2.0

Published

HypnoLog Server - debug/logging tool for visualizing you data

Downloads

3

Readme

HypnoLog

Get Hypnotized While Logging

HypnoLog allows you to fast and easily visualize your application data/objects while debugging from any environment, in any language. Forget about those black text-based console debug-printing back from the 70's.

Features

  • Log from any language/technology/environment (all you need is HTTP support). See Language wrappers.
  • Visualize any data. Use existing or add your own visualization. It's a web application, do everything possible in a web browser and use any existing visualization libraries. Read more about Visualizers.

Why do I need this?

  • You're developing an application with reach data and while debugging you want to view you data as image/graph/map/whatever and not as long-unreadable-block-of-text.
  • You don't want to waste precious time on developing your own debugging tools.
  • You're working with multiple end points and you need to see all of their output in one clear place.
  • You're working with multiple languages/technologies and you want one debug/logging visualization tool to rule them all.
  • You're tired of those boring black and white text consoles with a buffer memory of a fish, which close in your face just when you need them, and generally speaking, have a user experience of a cave man...

Example

Write this (this is Python, but see how to log in any other language):

import hypnolog as HL

HL.log('Hello HypnoLog from Pyhton!');

import numpy
npArray = 1 + numpy.sin(2 * numpy.pi * numpy.arange(0.0, 2.0, 0.01))
HL.log(npArray.tolist(), 'plot');

locations = [ ['Lat', 'Long', 'Name'], [37.4232, -122.0853, 'Work'], [37.4289, -122.1697, 'University'], [37.6153, -122.3900, 'Airport'], [37.4422, -122.1731, 'Shopping'] ];
HL.log(locations, 'GoogleMaps');

See this: alt text

How does it work

Easy. HypnoLog sends the logged data/objects from your application as JSON HTTP requests to HypnoLog server. HypnoLog server sends it to the web browser. Web browser displays the data as you wish. You see your logged data - visualized and shining as you want. Read more in the full Documentation.

Usage

Setup HypnoLog server

This is a Node.js module available through the npm registry.
Before installing, download and install Node.js.
Then, installation via npm:

$ npm install -g hypnolog-server

This will install hypnolog-server globally so that it may be run from the command line.

Start HypnoLog server

How to Log

Logging in HypnoLog done by sending JSON HTTP requests to HypnoLog server. To make logging effortless, use libraries for you development language which implement and wrap all this logic into super simple functions.

For example, logging array of numbers in C# as a graph (plot):

HL.Log(new []{1, 2, 3}, "plot");

No wrapper library for your language? Logging to HypnoLog is simply sending an HTTP POST request with JSON message. See Language wrappers. Develop your own and contribute!

War stories (as continue to "Why do I need this?") :

  • Debugging image processing algorithm written in C# with Emgu CV, running as a service on Windows machine.
    Without HypnoLog: looking at huge arrays of numbers with Visual Studio DataTip tool, or messy console output.
    With HypnoLog: viewing color histograms, output image at any step and any other data as graphs.
  • Debugging Localization algorithm running on a remote robot with real time laser sensors, written in Java on Linux.
    Without HypnoLog: wasting time writing Java code to draw images of the map, saving each snapshot as a file, deal with folder with hundreds of file and open each one manually.
    With HypnoLog: viewing the map of the room, with robot's laser and algorithm's prediction, all at real time in the browser.
  • Keep track of communication between Client and multiple distributed Servers written in C# on Windows. The client sends multiple requests to each server, and needs them all to complete the task. Keeping track of which of the 30 distributed servers failed the task by reading each log file can be nightmare.
    Without HypnoLog: missing the single error line in thousands line long console output (which then get lost as the console buffer big enough) or looking for same error message in hundreds of log files.
    With HypnoLog: log all the servers to same HypnoLog at the developer machine, view all output at the same browser window, and just Ctrl+F for the needed message (or filter using tags).
  • Debugging headless browser bot written in Python on Windows.
    Without HypnoLog: writing code to saving browsers snapshots as images, while trying to keep some order by naming each image and fill up some folder with output images.
    With HypnoLog: just log each snapshot directly to HypnoLog, view it one after the other with text notes in the browser.
  • Your war story here...
Notes
  • Web UI tested only on Google Chrome browser.