# Using logback within Sheild custom realm

**URL:** <https://discuss.elastic.co/t/using-logback-within-sheild-custom-realm/48486>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [April 26, 2016, 10:45pm UTC](https://discuss.elastic.co/t/using-logback-within-sheild-custom-realm/48486 "2016-04-26T22:45:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![weed101](https://avatars.discourse-cdn.com/v4/letter/w/f05b48/32.png) [@weed101](https://discuss.elastic.co/u/weed101)\
**Post date:** [April 26, 2016, 10:45pm UTC](https://discuss.elastic.co/t/using-logback-within-sheild-custom-realm/48486/1 "2016-04-26T22:45:59Z")

</div>

Hello Everyone,

I'm new to Shield and attempting to create a custom realm.

We have an existing application, which provides us with user roles, and I am trying to integrate the application within my custom realm. I have placed it in the authenticate method so it would populate the user role accordingly.

Unfortunately, it seems to have an issue running within the Shields plugin framework and now I would like to trace it. The existing application uses logback, but I noticed Shield uses log4j. Is there a way to enable logback to I can see my application's logs within Shield?

Thanks for any info you can offer up.

---

<div class="post-metadata">

**Author:** ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)\
**Post date:** [April 26, 2016, 11:07pm UTC](https://discuss.elastic.co/t/using-logback-within-sheild-custom-realm/48486/2 "2016-04-26T23:07:04Z")

</div>

I think you need to look into replacing log4j in elasticsearch with logback since shield does not control the logger; we piggyback on the elasticsearch infrastructure. There is an _old_ thread about it but I really have no idea if it will still work. [Replacing log4j with logback](https://discuss.elastic.co/t/replacing-log4j-with-logback/8470)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:45pm UTC](https://discuss.elastic.co/t/using-logback-within-sheild-custom-realm/48486/3 "2017-07-06T13:45:06Z")

</div>


