'Log Auth event from HttpServletRequest
I want to log details of auth event through HttpServletRequest.
For eg :INFO 2020-01-01 12:00:01 user.id="John Doe" evt.category="authentication" evt.name="google auth" evt.outcome="fail" network.client.ip=1.2.3.4 pingfed.cause="access_denied".
Could you please help me with parameters I can use to get these details from the request? Thanks
Solution 1:[1]
You can do it this way:
tokenized=[['dog', 'cat' , 'fish'], ['car', 'dog', 'water'], ['blue', 'red', 'green']]
most_common_words = ['cat','dog']
for l in tokenized:
for w in most_common_words:
try:
l.remove(w)
except ValueError: pass
print(tokenized)
# output:
# [['fish'], ['car', 'water'], ['blue', 'red', 'green']]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | zvi |
