Skip to content

Commit e7bd045

Browse files
author
Shakeel Mohamed
committed
Revert casing of self.sourceType in modinputs Event class; edit changelog, still pending David Noble's changes
1 parent 160a1ba commit e7bd045

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313

1414
### Breaking changes
1515

16-
* If you're not expecting Splunk to index these modular inputs with a sourcetype set,
17-
when updating to this version of the SDK you will see these events unexpectedly.
16+
* If modular inputs were not being indexed by Splunk because a sourcetype was set
17+
(and the SDK was not handling them correctly), they will be indexed upon updating
18+
to this version of the SDK.
1819

1920
### Minor changes
2021

21-
* Docstring corrections in modular input examples.
22+
* Docstring corrections in the modular input examples.
2223

2324
* A minor docstring correction in `splunklib/modularinput/event_writer.py`.
2425

splunklib/modularinput/event.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(self, data=None, stanza=None, time=None, host=None, index=None, sou
6363
self.host = host
6464
self.index = index
6565
self.source = source
66-
self.sourcetype = sourcetype
66+
self.sourceType = sourcetype
6767
self.stanza = stanza
6868
self.time = time
6969
self.unbroken = unbroken
@@ -91,7 +91,7 @@ def write_to(self, stream):
9191
# add all other subelements to this Event, represented by (tag, text)
9292
subelements = [
9393
("source", self.source),
94-
("sourcetype", self.sourcetype),
94+
("sourcetype", self.sourceType),
9595
("index", self.index),
9696
("host", self.host),
9797
("data", self.data)

0 commit comments

Comments
 (0)