A judge said the prison system was 'screaming' at courts to avoid jailing people - but said the attack was too serious