You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Thanks for great module !!
Would appreciate your help - I think (but not 100% sure) that it's not possible to use BASIC_AUTH in yaml/json configuration as the current auth_type is passed via a Python object (CMRESHandler.AuthType.BASIC_AUTH) . I wonder if i missed anything ?
To solve my problem (use json configuration without forking the project) I'm deriving from CMRESHandler and just on the fly changing the string "BASIC_AUTH" into CMRESHandler.AuthType.BASIC_AUTH.
For example:
class MyCMRESHandler(cmreslogging.handlers.CMRESHandler):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if self.auth_type == "BASIC_AUTH":
self.auth_type = cmreslogging.handlers.CMRESHandler.AuthType.BASIC_AUTH
and then in my json configuration i use "class": "MyCMRESHandler".
I wonder if there's a better way that i missed . Of course, i can fork the project and modify the __get_es_client but i'd rather avoid forking .
The text was updated successfully, but these errors were encountered:
This feature has been added in https://github.com/mkhadher/python-elasticsearch-logger. You can either specify python object CMRESHandler.AuthType.BASIC_AUTH or string "BASIC_AUTH". There's an example on how to use JSON config file to configure the Elastcisearch handler (PYESHandler)
Hi,
Thanks for great module !!
Would appreciate your help - I think (but not 100% sure) that it's not possible to use BASIC_AUTH in yaml/json configuration as the current auth_type is passed via a Python object (CMRESHandler.AuthType.BASIC_AUTH) . I wonder if i missed anything ?
To solve my problem (use json configuration without forking the project) I'm deriving from CMRESHandler and just on the fly changing the string "BASIC_AUTH" into CMRESHandler.AuthType.BASIC_AUTH.
For example:
and then in my json configuration i use
"class": "MyCMRESHandler"
.I wonder if there's a better way that i missed . Of course, i can fork the project and modify the
__get_es_client
but i'd rather avoid forking .The text was updated successfully, but these errors were encountered: