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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tick-core/logger

v1.4.2

Published

## 介绍 对 winston 的封装,[tick-core-http-server](https://github.com/hiver-han/tick-core-http-server)集成了tick-core-logger

Readme

tick-core-logger——日志记录和日志切割组件

介绍

对 winston 的封装,tick-core-http-server集成了tick-core-logger

快速开始

npm install @tick-core/logger
import { Logger } from '@tick-core/logger'
const logger = new Logger(logPath: string, isLocal?: boolean)

参数|描述 :--|:-- logPath|日志存储位置 isLocal|是否是本地开发

⚠️️注意:
isLocaltrue时所有日志级别都会打印,否则只打印accss log,默认为false

API

日志记录

  • 获取信息日志和普通错误日志
const { error, info } = logger.getLogger(logType: string)
error(tid: string, error: Record<string, any> | string, data?: Record<string, any>)
info(tid: string, data: Record<string, any>)
  • 获取进程日志和http请求相关日志
const { access, app, appError } = logger.getAppLogger()
access(data: string)
app({
  tid?: string,
  requestTime?: string,
  responseTime?: string,
  pid?: number,
  method?: string,
  url?: string,
  status?: number,
  ms?: number,
  data?: {
    query?: Record<string, any>,
    body?: Record<string, any>,
    params?: Record<string, any>,
    user?: Record<string, any>,
    ip?: string,
  },
})
appError(tid: string, error: Error)

函数名|描述 :--|:-- error|普通错误日志 info|普通信息日志 access|进程日志 app|http请求日志 appError|http请求失败日志(http code 不等于200)

参数名|描述 :--|:-- logType|日志类型 tid|请求id error|错误信息描述 data|日志消息 requestTime|请求时间 responseTime|响应时间 pid|进程id method|方法 url|请求uil status|http status code ms|请求到响应的时间差 query|query参数 body|body参数 params|params参数 user|user 信息 ip|ip