Dynamic log lenght