Project

General

Profile

mod_accesslog.c.diff

HenrikHolst, 2016-07-20 13:47

View differences:

mod_accesslog.c 2016-07-20 15:44:48.674773810 +0200
580 580
					f->opt |= FORMAT_FLAG_TIME_USEC;
581 581
					srv->srvconf.high_precision_timestamps = 1;
582 582
				} else if (FORMAT_TIME_USED == f->field) {
583
					const char * const ptr = f->string->ptr;
584

  
585 583
					if (f->opt & ~(FORMAT_FLAG_TIME_SEC)) srv->srvconf.high_precision_timestamps = 1;
586 584

  
587 585
					if (buffer_string_is_empty(f->string)
588
					      || 0 == strcmp(ptr, "s")  || 0 == strcmp(ptr, "sec"))  f->opt |= FORMAT_FLAG_TIME_SEC;
589
					else if (0 == strcmp(ptr, "ms") || 0 == strcmp(ptr, "msec")) f->opt |= FORMAT_FLAG_TIME_MSEC;
590
					else if (0 == strcmp(ptr, "us") || 0 == strcmp(ptr, "usec")) f->opt |= FORMAT_FLAG_TIME_USEC;
591
					else if (0 == strcmp(ptr, "ns") || 0 == strcmp(ptr, "nsec")) f->opt |= FORMAT_FLAG_TIME_NSEC;
586
					      || 0 == strcmp(f->string->ptr, "s")  || 0 == strcmp(f->string->ptr, "sec"))  f->opt |= FORMAT_FLAG_TIME_SEC;
587
					else if (0 == strcmp(f->string->ptr, "ms") || 0 == strcmp(f->string->ptr, "msec")) f->opt |= FORMAT_FLAG_TIME_MSEC;
588
					else if (0 == strcmp(f->string->ptr, "us") || 0 == strcmp(f->string->ptr, "usec")) f->opt |= FORMAT_FLAG_TIME_USEC;
589
					else if (0 == strcmp(f->string->ptr, "ns") || 0 == strcmp(f->string->ptr, "nsec")) f->opt |= FORMAT_FLAG_TIME_NSEC;
592 590
					else {
593 591
						log_error_write(srv, __FILE__, __LINE__, "sb",
594 592
							"invalid time unit in %{UNIT}T:", s->format);