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

@poap-xyz/poap-logger

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@poap-xyz/poap-logger - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

readme.md

2

package.json
{
"name": "@poap-xyz/poap-logger",
"version": "1.0.2",
"version": "1.1.0",
"description": "A logger for POAP",

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

@@ -1,8 +0,25 @@

import { PoapLogger } from "./types";
import { WinstonLogger } from "./winstonLogger";
import {PoapLogger, PoapLoggerType} from "./types";
import {WinstonLogger} from "./implementations/winstonLogger";
type Options = {
metadata?: { [p: string]: unknown },
type?: PoapLoggerType,
}
export class PoapLoggerFactory {
public static CreatePoapLogger() : PoapLogger {
return new WinstonLogger();
private static logger: PoapLogger | undefined;
private static defaultOptions: Options = {
type: PoapLoggerType.WINSTON_LOGGER,
}
public static getLoggerInstance(options: Options): PoapLogger {
const _options = { ...this.defaultOptions, ...options };
// here you have to handle more logger types
if (!this.logger) {
this.logger = _options.metadata ? new WinstonLogger().child({ ..._options.metadata }) : new WinstonLogger();
}
return this.logger;
}
}

@@ -23,2 +23,6 @@ export interface PoapLogger {

export enum PoapLoggerType {
WINSTON_LOGGER
}
export { PoapLoggerFactory } from "./poapLoggerFactory";

Sorry, the diff of this file is not supported yet

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