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

egg-syslog-plugin

v1.0.0

Published

syslog plugin for eggjs

Downloads

6

Readme

egg-syslog

why&how

  • node应用部署后查看日志的方式比较繁琐且不友好,需要登录服务器、通过命令行查看等

  • 通过将应用产生的日志写入syslog服务的方式进行日志采集,最终可通过搭建web日志平台来结构化查询log

开启插件

// config/plugin.js
exports.syslog = {
  enable: true,
  package: 'egg-syslog',
};

syslog简介

syslog是一种收发日志数据的标准网络服务,支持TCP/UDP等协议;

详细配置

  • appName - {String}应用名,默认为应用package.json中的name字段(通过web查看日志时可通过应用名application_name字段进行过滤)
  • level - {String}日志级别(默认为INFO,即INFO及以上级别的日志会被写入syslog服务,可选值为NONE、DEBUG、INFO、WARN、ERROR,传入NONE时关闭syslog)
  • target - {String}syslog服务主机地址
  • port - {Number}syslog服务端口,默认514
  • transport - {Number},syslog服务协议(TCP:1/UDP:2),默认UDP

配置示例

// config/config.default.js
exports.syslog = {
  appName: 'app1',
  level: 'DEBUG',
};

License

MIT