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

@types/graylog2

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/graylog2

TypeScript definitions for graylog2

  • 0.2.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
increased by9.93%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/graylog2

Summary

This package contains type definitions for graylog2 (https://github.com/Wizcorp/node-graylog2).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graylog2.

index.d.ts

/// <reference types="node" />

import { EventEmitter } from "events";

export type GraylogDeflate = "optimal" | "always" | "never";

export type GraylogLogMethod =
    | "log"
    | "emergency"
    | "alert"
    | "critical"
    | "error"
    | "warning"
    | "warn"
    | "notice"
    | "info"
    | "debug";

export interface GraylogConfig {
    /**
     * The name of a host.
     * The default value is "os.hostname()"
     */
    hostname?: string | undefined;

    /**
     * The facility - log's field type in Graylog.
     * The default value is "Node.js"
     */
    facility?: string | undefined;

    /**
     * The strategy for a message compression:
     *  "always"  -  every message will be compressed with zlib.deflate
     *  "never"   -  no compression
     *  "optimal" -  messages bigger than GraylogConfig.bufferSize will be compressed
     *
     *  The default value is "optimal"
     */
    deflate?: GraylogDeflate | undefined;

    /**
     * The max UDP packet size. Should never exceed the MTU of your system.
     * The default value is 1400
     */
    bufferSize?: number | undefined;

    /**
     * The list of graylog servers
     */
    servers: ReadonlyArray<Readonly<{ host: string; port: number }>>;
}

export class graylog extends EventEmitter {
    constructor(config: Readonly<GraylogConfig>);

    log(message: string | Error | Record<string, any>): void;
    log(message: string, fullMessage: string, additionalFields?: Record<string, any>, timestamp?: number): void;
    log(message: string | Error, additionalFields?: Record<string, any>, _?: undefined, timestamp?: number): void;
    log(
        message: string | Error | Record<string, any>,
        _: undefined,
        additionalFields: Record<string, any> | undefined,
        timestamp?: number,
    ): void;

    emergency: graylog["log"];
    alert: graylog["log"];
    critical: graylog["log"];
    error: graylog["log"];
    warning: graylog["log"];
    warn: graylog["log"];
    notice: graylog["log"];
    info: graylog["log"];
    debug: graylog["log"];

    close(callback?: (err: Error | undefined) => void): void;
}

export namespace graylog {
    const graylog: graylog;
}

Additional Details

  • Last updated: Wed, 18 Oct 2023 01:17:35 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Andrey Kun.

FAQs

Package last updated on 18 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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