New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Light: add loggen support #3441
Conversation
Build SUCCESS |
97bb0d8
to
3aee78d
Compare
I would rather have something like:
|
Build SUCCESS |
3aee78d
to
426ded1
Compare
|
Build SUCCESS |
426ded1
to
96d3a47
Compare
Build SUCCESS |
Build SUCCESS |
9e60965
to
92c1f59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Build SUCCESS |
|
||
instanceIndex = -1 | ||
@staticmethod | ||
def get_new_instance_index(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should start with _
to make it "private".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could actually make it private with double _
.
(https://www.tutorialsteacher.com/python/private-and-protected-access-modifiers-in-python)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little fun with the count
generator, if you want to:
import itertools
class Loggen(object):
index = itertools.count()
get_new_index = lambda : next(Loggen.index)
print(Loggen.get_new_index())
print(Loggen.get_new_index())
You can add _
in the front too for personal preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved from my side. Thanks! :)
self.loggen_proc = None | ||
self.loggen_bin_path = tc_parameters.INSTANCE_PATH.get_loggen_bin() | ||
|
||
def _decode_start_parameters( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing parameter:
-s, --size=<size> Specify the size of the syslog message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@norberttak I think this is still missing.
92c1f59
to
f538beb
Compare
Build SUCCESS |
Signed-off-by: Norbert Takacs <norbert.takacs@oneidentity.com>
f538beb
to
40808c1
Compare
Build SUCCESS |
Yes! |
Add the possibility to use loggen from Light scripts.
Typical use:
loggen.start("127.0.0.1", 6666, tcp=True, inet=True, rate=1)