-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathStoreLoggerSplunk.ts
More file actions
32 lines (31 loc) · 1.01 KB
/
StoreLoggerSplunk.ts
File metadata and controls
32 lines (31 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import StoreLogger from './StoreLogger'
export default class StoreLoggerSplunk extends StoreLogger {
public saving(id: number): void {
this.SplunkLogger(`Saving message ${id}.`)
}
public saved(id: number): void {
this.SplunkLogger(`Saved message ${id}.`)
}
public readingFilestore(id: number): void {
this.SplunkLogger(`Reading message ${id} from FileStore.`)
}
public readingCache(id: number): void {
this.SplunkLogger(`Reading message ${id} from StoreCache.`)
}
public didNotFind(id: number): void {
this.SplunkLogger(`No message ${id} found.`)
}
public missingFromCache(id: number): void {
this.SplunkLogger(`Message ${id} missing from cache.`)
}
public returning(id: number): void {
this.SplunkLogger(`Returning message ${id}.`)
}
public errorSaving(id: number): void {
this.SplunkLogger(`Error saving message ${id}.`)
}
// Private method to return a hypothetical SplunkLogger
private SplunkLogger(log: string) {
console.log("Logged to Splunk: ", log);
}
}