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

logs_cppaddon

v1.0.2

Published

V8 addon exemple

Downloads

7

Readme

Mini projet afin de démontrer les possibilités et les utilisations des addons C++

Utilitaires nécéssaires

  • sudo npm install -g log.io
  • edit ~/.log.io/harvester.conf et mettre:
	exports.config = {
  		nodeName: "application_server",
  		logStreams: {
		    test_logs: [
		      "/home/v3/Projects/logs_addon/logs/filelog-info.log"
		    ]
	  	},
	  	server: {
		    host: '127.0.0.1',
		    port: 28777
	  	}
	}
  • edit node_modules/log.io/lib/log.io.js ligne 16352 mettre:
	exports.logMessage = "<p>\n<span class='stream color<%= lmessage.get('stream').color %>'><%= lmessage.get('stream').id %></span>\n<span class='node color<%= lmessage.get('node').color %>'><%= lmessage.get('node').id %></span>\n<span class='message'><% var levels = {silly: '15',debug: '2',verbose: '20',info: '19',warn: '3',error: '7'}; var color = 'color' + levels[(JSON.parse(msg)).level]; var pp = JSON.parse(msg); var dd = new Date(pp.timestamp);%><span style='font-weight:bold' class='level <%= color %>'><%= pp.level %></span> <span class='time color15'><%= dd %></span><pre class='prettyprint <%= color %>'><%= JSON.stringify(pp.message, null, 4) %></pre></span>\n</p>";

*edit log.io.css et mettre à la fin

pre.prettyprint { display: block; background-color: #333; font-family: Inconsolata; font-size: 11px;}
  • sudo add-apt-repository ppa:george-edison55/cmake-3.x
  • sudo apt-get update
    • Si Cmake n est pas déjà installé: sudo apt-get install cmake
    • Si Cmake est déjà installé: sudo apt-get upgrade cmake
  • sudo apt-get install g++
  • nodejs

Utilisation du projet

Installation

	-npm install

Log.io

Pour démarrer les logs:

  1. Logio-server: log.io-server
  2. Logio-harvester: log.io-harvester
  3. Interface: http://localhost:28778/

Construction et lancement de l'application

Utilisez la commande npm run cm pour construire et lancer l'application. Pour y accéder, l'adresse est http://localhost:1337 Cela va lancer la seule requête possible sur l'application. Il faut ensuite regarder index.js Pour voir le fonctionnement détaillé