replacing AUTO by the proper logical type in f_log and d_log