I'm trying to do logging for different user roles (admin, developers, end users, etc.), and I want to show a different/filtered log for end-users. How can I achieve that?
How can I approach this problem?
I'm trying to do logging for different user roles (admin, developers, end users, etc.), and I want to show a different/filtered log for end-users. How can I achieve that?
How can I approach this problem?
Copyright © 2021 Jogjafile Inc.
You could probably tackle this problem with using something like a
ThreadLocalvariable in your logging filter. That is set by the code that does the authentication. And based on that do your different logging.A simple example, in your filter class you could have something like this:
And in your authentication code: