File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 11import { 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
Original file line number Diff line number Diff line change 1- import { Logger , Severity } from "splunk-logging" ;
1+ import { Logger } from "splunk-logging" ;
22
33const 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 ,
You can’t perform that action at this time.
0 commit comments