Skip to content
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

Filter log statements by user #534

Merged
merged 2 commits into from Aug 6, 2018

Conversation

Projects
None yet
2 participants
@jochenkressin
Copy link
Collaborator

commented Aug 5, 2018

This PR adds the authenticated user to the log4j ThreadContext. This makes it possible to filter log messages by user and is most useful when debugging Kibana permission problems. You can filter the internal kibanaserver user in log4j2.properties like:

appender.console.type = Console
appender.console.name = console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
appender.console.filter.user.type = ThreadContextMapFilter
appender.console.filter.user.onMatch=DENY
appender.console.filter.user.onMisMatch=NEUTRAL
appender.console.filter.user.value1.type=KeyValuePair
appender.console.filter.user.value1.key=user
appender.console.filter.user.value1.value=kibanaserver

@floragunncom floragunncom merged commit 872aa53 into master Aug 6, 2018

1 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build cancelled
Details
continuous-integration/appveyor/branch AppVeyor build failed
Details
ci/circleci: build Your tests passed on CircleCI!
Details

@floragunncom floragunncom deleted the feature/logmarkers branch Mar 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.