Quote from: oleg on August 10, 2009, 07:09:55 PM
Добрый день!
Такой вопрос.
А как можно парсить логи имя которых не постоянно, а типа log090810.log? На следующий день соответственно log090811.log.
В имени файла можно использовать макросы:
%a Abbreviated weekday name
%A Full weekday name
%b Abbreviated month name
%B Full month name
%c Date and time representation
%d Day of the month (01-31)
%H Hour in 24h format (00-23)
%I Hour in 12h format (01-12)
%j Day of the year (001-366)
%m Month as a decimal number (01-12)
%M Minute (00-59)
%p AM or PM designation
%S Second (00-61)
%U Week number with the first Sunday as the first day of week one (00-53)
%w Weekday as a decimal number with Sunday as 0 (0-6)
%W Week number with the first Monday as the first day of week one (00-53)
%x Date representation
%X Time representation
%y Year, last two digits (00-99)
%Y Year
%Z Timezone name or abbreviation
%% A % sign
В нашем случае это будет log%y%m%d.log
You can also consider ordering custom development from Raden Solutions (
Мы в ближайших версиях поменяем формат на XML.