package Ġuk . gov . just ice . digital . h mp ps . send legal mailto pr is ons api . config Ċ Ċ import Ġmu . Kotlin Logging Ċ import Ġorg . springframework . context . Application Listener Ċ import Ġorg . springframework . context . event . Context Ref reshed Event Ċ import Ġorg . springframework . stereotype . Component Ċ Ċ private Ġval Ġlog Ġ= ĠKotlin Logging . logger Ġ{} Ċ Ċ @ Component Ċ class ĠLog Memory Configuration At Startup Event Ġ: ĠApplication Listener < Context Ref reshed Event > Ġ{ ĊĊĠ Ġoverride Ġfun Ġon Application Event ( event : ĠContext Ref reshed Event ) Ġ{ ĊĠĠĠ Ġwith ( Runtime . get Runtime ()) Ġ{ ĊĠĠĠĠĠ Ġlog . info Ġ{ Ġ" heap Size : Ġ${ total Memory (). render As Mb ()}, Ġheap MaxSize : Ġ${ max Memory (). render As Mb ()}, Ġheap Free Size : Ġ${ free Memory (). render As Mb () }" Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun ĠLong . render As Mb (): ĠString Ġ{ ĊĠĠĠ Ġreturn Ġ"${ this Ġ/ Ġ 1 0 2 4 Ġ/ Ġ 1 0 2 4 } MB " ĊĠ Ġ} Ċ } Ċ