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

taillog

v0.1.4

Published

Realtime log monitoring in your soft

Downloads

9

Readme

taillog

taillog 是Node.js下的程序包,可以应用在项目中监听文件变化,典型的使用案例是监听服务器日志文件,根据日志文件内容进行业务处理。

  1. 可以用于报警,当出现错误日志时
  2. 可以及时分析用户浏览状况,在不干设计到业务程序代码的情况下
  3. 可以将部分生产系统的日志开放给开发人员,用于处理线上产品的业务问题
  4. 可以用在多人开发服务器接口的场景,可以实时反馈nginx、apache、Node.js的访问log、错误log、debug log到网页中。方便客户端开发人员及时了解到服务器状况,而不需要登录服务器

安装

npm install taillog

使用


var taillog = require('taillog');

// 创建一个监听
var tail = taillog.createListen({
	filePath: "./app.log",      // 监听的日志文件
	interval: 10                // 监听的灵敏度,单位毫秒
});

// 收听监听内容
tail.on("data", function(data) {
	// 这里可以吧监听到的数据进行处理或发送给其他程序
	console.log("fire:" + data);
});

// 开始监听
tail.start();

// 停止监听
// tail.stop();