Socket
Socket
Sign inDemoInstall

@types/bunyan

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/bunyan - npm Package Compare versions

Comparing version 0.0.37 to 1.8.0

241

bunyan/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for node-bunyan
// Type definitions for bunyan 1.8
// Project: https://github.com/trentm/node-bunyan

@@ -13,10 +13,11 @@ // Definitions by: Alex Mikhalev <https://github.com/amikhalev>

addStream(stream: Logger.Stream): void;
addSerializers(serializers: Logger.Serializers | Logger.StdSerializers): void;
child(options: Logger.LoggerOptions, simple?: boolean): Logger;
child(obj: Object, simple?: boolean): Logger;
addSerializers(serializers: Logger.Serializers): void;
child(options: Object, simple?: boolean): Logger;
reopenFileStreams(): void;
level(): string | number;
level(value: number | string): void;
levels(name: number | string, value: number | string): void;
level(): number;
level(value: Logger.LogLevel): void;
levels(): number[];
levels(name: number | string): number;
levels(name: number | string, value: Logger.LogLevel): void;

@@ -26,5 +27,7 @@ fields: any;

/* tslint:disable:unified-signatures */
/**
* Returns a boolean: is the `trace` level enabled?
*
*
* This is equivalent to `log.isTraceEnabled()` or `log.isEnabledFor(TRACE)` in log4j.

@@ -40,23 +43,21 @@ */

*/
trace(error: Error, format?: any, ...params: any[]): void;
trace(error: Error, ...params: any[]): void;
trace(buffer: Buffer, format?: any, ...params: any[]): void;
/**
* Uses `util.format` for msg formatting.
*/
trace(format: string | number, ...params: any[]): void;
/**
* The first field can optionally be a "fields" object, which
* is merged into the log record.
*
*
* To pass in an Error *and* other fields, use the `err`
* field name for the Error instance.
*/
trace(obj: Object, format?: any, ...params: any[]): void;
trace(obj: Object, ...params: any[]): void;
/**
* Uses `util.format` for msg formatting.
*/
trace(format: any, ...params: any[]): void;
/**
* Returns a boolean: is the `debug` level enabled?
*
*
* This is equivalent to `log.isDebugEnabled()` or `log.isEnabledFor(DEBUG)` in log4j.

@@ -72,23 +73,21 @@ */

*/
debug(error: Error, format?: any, ...params: any[]): void;
debug(error: Error, ...params: any[]): void;
debug(buffer: Buffer, format?: any, ...params: any[]): void;
/**
* Uses `util.format` for msg formatting.
*/
debug(format: string | number, ...params: any[]): void;
/**
* The first field can optionally be a "fields" object, which
* is merged into the log record.
*
*
* To pass in an Error *and* other fields, use the `err`
* field name for the Error instance.
*/
debug(obj: Object, format?: any, ...params: any[]): void;
debug(obj: Object, ...params: any[]): void;
/**
* Uses `util.format` for msg formatting.
*/
debug(format: any, ...params: any[]): void;
/**
* Returns a boolean: is the `info` level enabled?
*
*
* This is equivalent to `log.isInfoEnabled()` or `log.isEnabledFor(INFO)` in log4j.

@@ -104,23 +103,21 @@ */

*/
info(error: Error, format?: any, ...params: any[]): void;
info(error: Error, ...params: any[]): void;
info(buffer: Buffer, format?: any, ...params: any[]): void;
/**
* Uses `util.format` for msg formatting.
*/
info(format: string | number, ...params: any[]): void;
/**
* The first field can optionally be a "fields" object, which
* is merged into the log record.
*
*
* To pass in an Error *and* other fields, use the `err`
* field name for the Error instance.
*/
info(obj: Object, format?: any, ...params: any[]): void;
info(obj: Object, ...params: any[]): void;
/**
* Uses `util.format` for msg formatting.
*/
info(format: any, ...params: any[]): void;
/**
* Returns a boolean: is the `warn` level enabled?
*
*
* This is equivalent to `log.isWarnEnabled()` or `log.isEnabledFor(WARN)` in log4j.

@@ -136,23 +133,21 @@ */

*/
warn(error: Error, format?: any, ...params: any[]): void;
warn(error: Error, ...params: any[]): void;
warn(buffer: Buffer, format?: any, ...params: any[]): void;
/**
* Uses `util.format` for msg formatting.
*/
warn(format: string | number, ...params: any[]): void;
/**
* The first field can optionally be a "fields" object, which
* is merged into the log record.
*
*
* To pass in an Error *and* other fields, use the `err`
* field name for the Error instance.
*/
warn(obj: Object, format?: any, ...params: any[]): void;
warn(obj: Object, ...params: any[]): void;
/**
* Uses `util.format` for msg formatting.
*/
warn(format: any, ...params: any[]): void;
/**
* Returns a boolean: is the `error` level enabled?
*
*
* This is equivalent to `log.isErrorEnabled()` or `log.isEnabledFor(ERROR)` in log4j.

@@ -168,23 +163,21 @@ */

*/
error(error: Error, format?: any, ...params: any[]): void;
error(error: Error, ...params: any[]): void;
error(buffer: Buffer, format?: any, ...params: any[]): void;
/**
* Uses `util.format` for msg formatting.
*/
error(format: string | number, ...params: any[]): void;
/**
* The first field can optionally be a "fields" object, which
* is merged into the log record.
*
*
* To pass in an Error *and* other fields, use the `err`
* field name for the Error instance.
*/
error(obj: Object, format?: any, ...params: any[]): void;
error(obj: Object, ...params: any[]): void;
/**
* Uses `util.format` for msg formatting.
*/
error(format: any, ...params: any[]): void;
/**
* Returns a boolean: is the `fatal` level enabled?
*
*
* This is equivalent to `log.isFatalEnabled()` or `log.isEnabledFor(FATAL)` in log4j.

@@ -200,88 +193,88 @@ */

*/
fatal(error: Error, format?: any, ...params: any[]): void;
fatal(error: Error, ...params: any[]): void;
fatal(buffer: Buffer, format?: any, ...params: any[]): void;
/**
* Uses `util.format` for msg formatting.
*/
fatal(format: string | number, ...params: any[]): void;
/**
* The first field can optionally be a "fields" object, which
* is merged into the log record.
*
*
* To pass in an Error *and* other fields, use the `err`
* field name for the Error instance.
*/
fatal(obj: Object, format?: any, ...params: any[]): void;
fatal(obj: Object, ...params: any[]): void;
/**
* Uses `util.format` for msg formatting.
*/
fatal(format: any, ...params: any[]): void;
/* tslint:enable:unified-signatures */
}
declare namespace Logger {
const TRACE: number;
const DEBUG: number;
const INFO: number;
const WARN: number;
const ERROR: number;
const FATAL: number;
const TRACE: number;
const DEBUG: number;
const INFO: number;
const WARN: number;
const ERROR: number;
const FATAL: number;
const stdSerializers: StdSerializers;
type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal' | number;
function createLogger(options: LoggerOptions): Logger;
const stdSerializers: StdSerializers;
function safeCycles(): (key: string, value: any) => any;
function createLogger(options: LoggerOptions): Logger;
function resolveLevel(value: number | string): number;
function safeCycles(): (key: string, value: any) => any;
interface Stream {
type?: string;
level?: number | string;
path?: string;
stream?: NodeJS.WritableStream | Stream;
closeOnExit?: boolean;
period?: string;
count?: number;
}
function resolveLevel(value: LogLevel): number;
interface LoggerOptions {
name: string;
streams?: Stream[];
level?: string | number;
stream?: NodeJS.WritableStream;
serializers?: Serializers | StdSerializers;
src?: boolean;
[custom: string]: any;
}
interface Stream {
type?: string;
level?: LogLevel;
path?: string;
stream?: NodeJS.WritableStream | Stream;
closeOnExit?: boolean;
period?: string;
count?: number;
}
interface Serializer {
(input:any): any;
}
interface LoggerOptions {
name: string;
streams?: Stream[];
level?: LogLevel;
stream?: NodeJS.WritableStream;
serializers?: Serializers;
src?: boolean;
[custom: string]: any;
}
interface Serializers {
[key: string]: Serializer
}
type Serializer = (input: any) => any;
interface StdSerializers {
err: Serializer;
res: Serializer;
req: Serializer;
}
interface Serializers {
[key: string]: Serializer;
}
interface RingBufferOptions {
limit?: number;
}
interface StdSerializers extends Serializers {
err: Serializer;
res: Serializer;
req: Serializer;
}
class RingBuffer extends EventEmitter implements NodeJS.WritableStream {
constructor(options: RingBufferOptions);
interface RingBufferOptions {
limit?: number;
}
writable: boolean;
records: any[];
class RingBuffer extends EventEmitter implements NodeJS.WritableStream {
constructor(options: RingBufferOptions);
write(record: any): boolean;
end(record?: any): void;
destroy(): void;
destroySoon(): void;
}
writable: boolean;
records: any[];
write(record: any): boolean;
end(record?: any): void;
destroy(): void;
destroySoon(): void;
}
}
export = Logger;
{
"name": "@types/bunyan",
"version": "0.0.37",
"description": "TypeScript definitions for node-bunyan",
"version": "1.8.0",
"description": "TypeScript definitions for bunyan",
"license": "MIT",

@@ -22,4 +22,4 @@ "contributors": [

"peerDependencies": {},
"typesPublisherContentHash": "9997ac9726f9cb573b949f58bae46769be5e2943bcfb7ff61da30f5bfea92023",
"typesPublisherContentHash": "6b04bc122daa617a597a6cc1bd8b572f9afd7a813f35b8e4a8d16d253aaf3a32",
"typeScriptVersion": "2.0"
}

@@ -5,3 +5,3 @@ # Installation

# Summary
This package contains type definitions for node-bunyan (https://github.com/trentm/node-bunyan).
This package contains type definitions for bunyan (https://github.com/trentm/node-bunyan).

@@ -12,3 +12,3 @@ # Details

Additional Details
* Last updated: Mon, 05 Jun 2017 19:55:52 GMT
* Last updated: Fri, 09 Jun 2017 14:51:29 GMT
* Dependencies: events, node

@@ -15,0 +15,0 @@ * Global values: none

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