jimmy-lt / loggen Goto Github PK
View Code? Open in Web Editor NEWA shell command to generate syslog messages to a remote host.
License: Other
A shell command to generate syslog messages to a remote host.
License: Other
Currently all active tasks will send the same message.
It should be possible for each active task to sent the next message in the queue.
Since we use a generator, when multiple active tasks are spawned message generation fails with the following:
$ loggen -N 2 127.0.0.1 Test
Exception in thread loggen-a0:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/loggen/loggen/__init__.py", line 420, in task_active
for msg in buffer:
ValueError: generator already executing
Add an option to send a defined number of messages.
Since 9b552e7, loop
parameter of message_generator
can be both a bool
or an int
.
The following line will always fail since loop
is set to 1
by default and therefore will always be True
.
Allow active tasks to be randomly delayed.
Add an option to send messages formatted using the BSD syslog format.
Add an option to send unique messages.
The delay
parameter has been changed to delay startup of the active tasks in d486320. However the old delay
parameter has been changed to wait
but not into the task code.
for msg in buffer:
[...]
# FIXME: Still using delay instead of wait here.
if delay > 0:
time.sleep(delay / 1000)
Send a log message without any alteration. loggen should consider that given message is already a valid syslog message.
Allow sending log messages by reading the content of all files within a directory.
The way messages are generated has been changed in 1702af2. But the loop
parameter has been forgotten in function task_active
and should be removed.
Function task_active
will not signal that it has finished it's activity when a connection exception occurs. This may lead to a lock-up.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.