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

loghandler

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loghandler - npm Package Compare versions

Comparing version 1.0.1 to 1.0.4

5

lib/index.d.ts

@@ -1,3 +0,3 @@

import { Config, ReportersInterface, LogObjectInterface, LogLevels } from './interfaces';
declare const logHandler: (config: Config) => import("./interfaces").LogHandlerResults;
import { Config, ReportersInterface, LogObjectInterface, LogLevels, LogHandlerResults } from './interfaces';
declare const logHandler: (config: Config) => LogHandlerResults;
export default logHandler;

@@ -8,2 +8,3 @@ export declare type ReportersInterface = ReportersInterface;

export declare type LogLevels = LogLevels;
export declare type Log = LogHandlerResults;
export declare const logLevelsKeys: ("emerg" | "alert" | "crit" | "err" | "warning" | "notice" | "info" | "debug")[];

2

package.json
{
"name": "loghandler",
"version": "1.0.1",
"version": "1.0.4",
"description": "Fully tested and strongly typed flexible Log Handler for all NodeJS projects.",

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

@@ -123,4 +123,28 @@ # LogHandler

### How to enable a reporter
Enabling a reporter that you downloaded or just created by yourself isn't hard. To add a reporter to the list of reporters that are used by loghandler can be easly done by adding the reporter to the list of reporters in the Loghandler options. Emample:
```
import loghandler from 'loghandler'
import example_reporter from 'example_reporter'
const config = {
reporters: [
new example_reporter(),
]
reporting: {
silent: false
minimalLevel2Report: 'debug'
}
}
const log = loghandler(config)
try{
throw new Error("Something goes wrong!")
}catch(err){
log.emerg(err)
}
```
### List of publicly available reporters

@@ -127,0 +151,0 @@

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