New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

logepi

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logepi - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "logepi",
"version": "1.0.1",
"version": "1.0.2",
"description": "A tiny (Togepi-sized) package for logs, built on top of Winston.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -74,2 +74,11 @@ <img align="left" src="https://i.imgur.com/PTzwjQY.jpg" height="150px" />

### Setting up an output level
In order to filter what messages are printed to the console transport, you can use the `Log.setOutputLevel()` method:
```js
// Limit messages to "error" level.
Log.setOutputLevel("error");
```
### Using the Koa middleware

@@ -76,0 +85,0 @@

@@ -16,2 +16,4 @@ import { Context } from "koa";

export class Log {
static setOutputLevel: (logLevel: LogLevel) => void;
static message: (

@@ -18,0 +20,0 @@ logLevel: LogLevel,

@@ -82,2 +82,4 @@ const winston = require("winston");

const consoleTransport = new winston.transports.Console();
const logger = winston.createLogger({

@@ -89,6 +91,10 @@ level: "info",

),
transports: [new winston.transports.Console()]
transports: [consoleTransport]
});
module.exports = class Log {
static setOutputLevel(logLevel) {
consoleTransport.level = logLevel;
}
static message(logLevel, message, data = {}) {

@@ -95,0 +101,0 @@ logger.log(logLevel, message, data);

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