npm install --save @types/pino-http Summary This package contains type definitions for pino-http (https://github.com/pinojs/pino-http#readme). Details Files were exported fromhttps://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pino-http. ...
http-ndjson (标准最低信息):9522.37 req / sec pino-http :21496 req / sec pino-http (极端):25770.91 req / sec 没有记录器:46139.64 req / sec 所有基准测试均在Macbook Pro 2013(2.6GHZ i7,16GB RAM)上进行。 安装 npm i pino-http --save 例子 'use strict' var http = re点...
首先,在你的Express应用程序中,确保你已经安装了Pino和相关的依赖。你可以使用以下命令安装Pino和Pino-HTTP包: 代码语言:txt 复制 npm install pino pino-http 接下来,在你的Express应用程序的入口文件中,引入和初始化Pino-HTTP。这样,Express应用程序的日志将会通过Pino进行记录。以下是一个简单的示例代码: 代码...
This is a stub types definition for @types/pino (http://getpino.io). pino provides its own type definitions, so you don't need @types/pino installed! Readme Keywords none npm i@types/pino Weekly Downloads 731,827 License MIT Unpacked Size ...
npm i pino-http --save Example 'use strict'consthttp=require('http')constserver=http.createServer(handle)constlogger=require('pino-http')()functionhandle(req,res){logger(req,res)req.log.info('something else')res.end('hello world')}server.listen(3000) ...
Actions Projects Security Insights Additional navigation options main BranchesTags Code Folders and files Name Last commit message Last commit date Latest commit History 1,825 Commits .github benchmarks build docs docsify examples lib test .eslintignore ...
4 [![npm version](https://img.shields.io/npm/v/pino)](https://www.npmjs.com/package/pino) 5 [![Build Status](https://img.shields.io/github/actions/workflow/status/pinojs/pino/ci.yml)](https://github.com/pinojs/pino/actions) ...
API ⇗ Browser API ⇗ Redaction ⇗ Child Loggers ⇗ Transports ⇗ Web Frameworks ⇗ Pretty Printing ⇗ Asynchronous Logging ⇗ Ecosystem ⇗ Help ⇗ Long Term Support Policy ⇗ Install ``` $npminstallpino ``` If you would like to install pino v6, refer to https://github....
``` sh npm install pino-elasticsearch -g ``` Usage ``` sh pino-elasticsearch To send pino logs to elasticsearch: cat log | pino-elasticsearch --node http://localhost:9200 Flags -h | --help Display Help -v | --version display Version -n | --node the URL where Elasticsearch is runn...
npm install pino 在代码中引入Pino库: 代码语言:txt 复制 const pino = require('pino'); 创建一个Pino实例,并配置destination模块: 代码语言:txt 复制 const logger = pino({ destination: pino.destination('path/to/log/file.log') // 设置日志输出目标为文件 }); 使用Pino实例记录日志: 代码语言:txt ...