I try to get the text from table in a roomDatabase, I access it by looping, and I use a foreach loop to access each item in the database

it manage work if I access the stringbuilder object inside the loop

```
var text = StringBuilder()
 db.adblogDao().getADBlog().forEach {

                it.forEach {
                    text.append("${it.log}")
                    text.append('\n')
                    // This work, why??
                  Timber.d("SUNLIGHT: ${text}")
                }
   }
   //text is always empty, why???
   Timber.d("MOONLIGHT: ${text}")

```

I want to access the string outside of the loop, but it always return null, why?