Dynamic height for log box