tamir-michaeli
e7f9585b6c
bug fixes
3 years ago
Adar Hilsenrat
fb5c06eb8b
Logging warning on a failed try to send to logz.io ( #56 )
Logging error only if all retries fails
5 years ago
Miri
3efc0ff160
Fixed flusher for serverless ( #50 )
* Fixed flusher for serverless
* fixed flusher
* Update README.md
Co-Authored-By: Ido Halevi <32218210+idohalevi@users.noreply.github.com>
* Update README.md
Co-Authored-By: Stefan (Shalom) <imnotashrimp@users.noreply.github.com>
* Update README.md
Co-Authored-By: Stefan (Shalom) <imnotashrimp@users.noreply.github.com>
Co-authored-by: Stefan (Shalom) <imnotashrimp@users.noreply.github.com>
Co-authored-by: Ido Halevi <32218210+idohalevi@users.noreply.github.com>
5 years ago
Zeev Tarantov
7e4847cf4a
place requests_session as member of handler
5 years ago
Zeev Tarantov
965ff76062
don't open a new https connection for every log flush
5 years ago
Oliver Seemann
d06b5a16fb
Add timeout for requests.post() operation
Like all network operations, performing the POST request may fail for various
reasons. When no response from the remote end is received, a requests.post()
call may never return, leading to an unbounded increase in the sender queue.
To remedy such situations let's add a timeout argument to the requests call and
make it configurable, to be adaptable for different environments.
For more information see
https://2.python-requests.org/en/master/user/quickstart/#timeouts
6 years ago
Ruda Porto Filgueiras
f87341d263
Deleting objects to make sure garbage collector will release memory.
6 years ago
Emile Fugulin
ca7be192be
Add flag to disable the local backup of logs
6 years ago
Ruda Porto Filgueiras
97eabc1137
Added alternative way to limit max number of logs when running in pypy since sys.getsizeof raises TypeError.
6 years ago
Roi Rav-Hon
19909d1fd9
Remove the exception info from the formatting
7 years ago
Roi Rav-Hon
b532a29d76
Even more pep8\!
7 years ago
Roi Rav-Hon
4bf2d09062
More pep8
7 years ago
Roi Rav-Hon
d3ee46e88c
pep8
7 years ago
Roi Rav-Hon
f14c580266
Treat exception and non-exception the same
7 years ago
asafc64
a302845b76
Fixed ignored extra fields when logging exceptions
7 years ago
nir0s
79d49b8038
Remove TODOs from code
7 years ago
Jotham Apaloo
c6c8171a68
Revert "Leave initialization in c'tor, just call start() where needed"
This reverts commit d41ceabe82
. Which I suspect
does not work because the thread is stateful, i.e. after os.fork the thread in
copy of the process thinks it has already been started, even though it is not
alive. Probably safest to just get a new thread instance if a thread is not alive.
7 years ago
Jotham Apaloo
d41ceabe82
Leave initialization in c'tor, just call start() where needed
7 years ago
Jotham Apaloo
066f73264d
Make logzio handler log correctly after os.fork()
7 years ago
nir0s
91f61ad8b1
Fix py3flake8 problems
7 years ago
nir0s
b0120dd869
Oops, add forgotten logger
7 years ago
nir0s
9da3e76b08
Replace "print" statements with a logger. Come on, it's 2018!
Also, only use lazy logger string formatting evaluations
7 years ago
nir0s
92b612f62f
Use single quotes instead of double quotes all around
7 years ago
nir0s
8ab14130d5
Format strings realistically and consistently
* Use non-marked format holders since we only support 2.7+
* Use format holders, only, no concat
7 years ago
nir0s
be328d3b26
Verify the token is not anything empty, not just "not an empty string"
If you pass an empty list, tuple, False, 0, whatever.. it will assume th
token is valid, which it isn't.
7 years ago
nir0s
2de666e92c
Use LogzioException when validating token
7 years ago
nir0s
27b212d2b7
Add LogzioException class
Currently the module raises generic Exception (very "don't do it")
7 years ago
nir0s
b511e9ed21
Fix some flake8 stuff and organize imports
7 years ago
Oren Mazor
cc31353d25
fix semantics I rushed through the first time. the handler shouldn't call a private method on the sender
7 years ago
Oren Mazor
27f76c2136
typo
7 years ago
Oren Mazor
7b2040706f
PEP8
7 years ago
Oren Mazor
df76f91e04
extract the queue draining action out of the loop. this way it can be manually called externally
7 years ago
TomasKuznetsov
e365b78d79
Fix tests for 3.6
7 years ago
TomasKuznetsov
44089aaf63
Added extra fields support
7 years ago
Roi Rav-Hon
f6ca061439
Fix bug that consumed more logs while draining than Logz.io's bulk limit
7 years ago
Jonathan Liuti
4333b965de
Fix #7 Return formatted message if format string
Currently logging with:
```
logger.info('hello %s', 'world')
```
will send the string "hello %s" to logz.io instead of "hello world"
This commit fixes this situation.
8 years ago
Roi Rav-Hon
7f6031f7f9
More python 3 compatibilities
8 years ago
Roi Rav-Hon
1fe6be90f7
First try on cross python 2 and 3 compatible code
8 years ago
Roi Rav-Hon
6b31517848
Rewrite most of the handler, tests were introduced
8 years ago
Roi Rav-Hon
ffc5191e40
Retry sending to logz.io
8 years ago
Marek Kudlacz
ffe751d0a6
Improve exception logging
Add tests
8 years ago
Marek Kudlacz
d51b4bc9a9
Fix formatter not being used.
Allow custom logzio fields to top level structure
8 years ago
MoisesRT
62b6541f89
removed the slash from the url
8 years ago
Roi Rav-Hon
74f2f37718
Better handle logz.io responses, and drain to file in case of an unrecoverable error
9 years ago
Roi Rav-Hon
05b7534f62
Initial handler release
9 years ago