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

zrplatform-lc-log

v1.0.51

Published

<!-- * @Descripttion: * @version: * @Author: zhaoxiang * @Date: 2019-12-10 13:36:04 * @LastEditors: zhaoxiang * @LastEditTime: 2019-12-12 08:00:26 --> # 丽呈日志插件 * <a href="#AccessLog">AccessLog</a>: 当前路由日志 * <a href="#ActionLog">ActionLog</a>: 动作日

Downloads

4

Readme

丽呈日志插件

  • AccessLog: 当前路由日志
  • ActionLog: 动作日志,通过client发起的网络请求日志
  • DataBaseLog: 数据库日志
  • BusinessLog: 业务日志
  • ThirdPartyLog: 第三方调用

使用方法

  1. 安装 npm install zrplatform-lc-log --save
  2. 在项目启动文件中作为zrplatform的log配置参数传入
const platform = require('zrplatform')
const httpTransport = require('zrplatform-http-transport')
const zrPlatformLcLog = require('zrplatform-lc-log')

platform
  .transport('http', httpTransport)
  .start()
  .logger(zrPlatformLcLog)

配置项说明

环境变量 | 说明 :---:|:---: ACCESSHOST | AccessLog 对应的kafka地址 ACCESSTOPIC | AccessLog 对应的Topic ACTIONHOST | ActionLog 对应的kafka地址 ACTIONTOPIC | ActionLog 对应的Topic BUSINESSHOST | BusinessLog 对应的kafka地址 BUSINESSTOPIC | BusinessLog 对应的Topic DATABASEHOST | DataBaseLog 对应的kafka地址 DATABASETOPIC | DataBaseLog 对应的Topic THIRDPARTYHOST | ThirdpartyLog 对应的kafka地址 THIRDPARTYTOPIC | ThirdpartyLog 对应的Topic

AccessLog

该日志参数由zrplatform框架拦截express的req和res创建

ActionLog

该日志参数由zrplatform框架拦截express和request的req和res创建

DataBaseLog

参数名 | 说明 | 默认值 :---:|:---:|:---: position | 位置 | scene | 场景 | logContent | 备注信息 | user | 用户 | error.message | 错误信息 | error.stack | 堆栈 |

BusinessLog

参数名 | 说明 | 默认值 :---:|:---:|:---: position | 位置 | scene | 场景 | logContent | 备注信息 | user | 用户 | error.message | 错误信息 | error.stack | 堆栈 |

ThirdPartyLog

参数名 | 说明 | 默认值 :---:|:---:|:---: logType | 是否异常,异常=1,正常=0 | methodName | 方法名称 | exceptionMessage | 异常信息 | detail | 详细异常信息 | parameters | 方法的入参 json格式 | result | 方法的返回值 json格式 | urlAliases | url别名 | realUrl | 真实请求的url | timeout | 超时时间 | retryCount | 重试次数 |