Skip to content

Commit 699dfdc

Browse files
authored
🤖 Merge PR DefinitelyTyped#72239 [splunk-logging] Severity is not actually exported by lib by @dhensby
1 parent 27c714b commit 699dfdc

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

‎types/splunk-logging/index.d.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { CoreOptions as RequestOptions } from "request";
22

3-
export enum Severity {
3+
export {};
4+
5+
export type Severity = "debug" | "info" | "warn" | "error";
6+
7+
// this enum isn't actually exported, but it is used as an internal value by the Logger.
8+
declare enum SeverityLevel {
49
DEBUG = "debug",
510
INFO = "info",
611
WARN = "warn",
@@ -44,7 +49,7 @@ export class Logger {
4449
eventFormatter: EventFormatter;
4550
requestOptions: RequestOptions;
4651
readonly serializedContextQueue: any[];
47-
readonly levels: typeof Severity;
52+
readonly levels: typeof SeverityLevel;
4853

4954
constructor(config: Config);
5055

‎types/splunk-logging/splunk-logging-tests.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Logger, Severity } from "splunk-logging";
1+
import { Logger } from "splunk-logging";
22

33
const config = {
44
token: "your-token-here",
@@ -48,7 +48,7 @@ const fullConfig = {
4848
path: "splunkPath",
4949
procotol: "https",
5050
port: 2,
51-
level: Severity.INFO,
51+
level: logger.levels.INFO,
5252
batchInterval: 3,
5353
maxBatchSize: 4,
5454
maxBatchCount: 5,

0 commit comments

Comments
 (0)