new log-current-section function