Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-logs-full

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-logs-full - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

6

lib/record.js

@@ -58,4 +58,8 @@ //处理logo日志

}catch(err){
if (err.stack) {
this.logger.error(err.stack.replace(/^/gm, ' ')+'\n\n');
}else{
this.logger.error(err.toString());
}
this.logger.error(err.stack.replace(/^/gm, ' ')+'\n\n');
this.logger.flush();

@@ -62,0 +66,0 @@

2

package.json
{
"name": "koa-logs-full",
"version": "0.0.1",
"version": "0.0.2",
"description": "仿照rails风格的轻量log库,可以按rails的log风格记录请求日志。可以很好的解决nodejs由于单进程导致的日志串起来的问题。",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -46,2 +46,3 @@ koa-logs-full[![Build Status](https://travis-ci.org/purplebamboo/koa-logs-full.svg?branch=master)](https://travis-ci.org/purplebamboo/koa-logs-full)

app.use(function*(next){
//任何能够拿到context的地方都可以使用
this.logger.log("我是要输出的文本");

@@ -48,0 +49,0 @@ //也可以使用error,warn,info.在终端输出的颜色会不同

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc