logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "流子℡" <41157...@qq.com>
Subject Question about how to create new log files on an hourly not depend on new byte stream log appended
Date Sun, 19 Jun 2016 15:09:00 GMT
hi,
here is my log config as follows:


		<RollingRandomAccessFile name="LingyuLog"			fileName="game"			filePattern="game.%d{yyyy-MM-dd-HH}.log">
		<PatternLayout pattern="%msg%n" />			<Policies>				<TimeBasedTriggeringPolicy
interval="1" modulate="true" />			</Policies>		</RollingRandomAccessFile>

As we know,for instance,now is 22:55 pm,the active file  named 'game' is printed continuously,
at 23:00 pm ,the first byte stream out will trigger the file named 'game' rename to game.2016-06-19-22.log,and
print the byte stream to the new file named 'game'. if no other byte stream in  the next one
hour, the behavior will not be triggered.
it will lead to that the log will be batch inserted into mysql db delay if we only pick up
the file having suffix '.log'.
because the content still remain in file  named 'game' not be suffix '.log'.


my question is  how to create new log files on an hourly not depend on new byte stream log
appended.


yours 
Allen
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message