Support Center

How to add 'hours' to log file names

Last Updated: Feb 16, 2017 01:10AM PST
If you have a large amount of log data, creating daily logs (default) may generate very large files.

You can split your daily logs further by adding 'hours' to the file name. This creates 24 smaller log files for each day.

To do this, use the {date:HH} parameter in the file name format. {date:HH} returns 01 through to 23 depending on the current hour.

Adding Hours to log file names
 

This will create 24 files each day like so:

192.168.168.168-2017-02-16-00.log

192.168.168.168-2017-02-16-01.log

192.168.168.168-2017-02-16-02.log

...

192.168.168.168-2017-02-16-23.log

A slightly more elegant way of doing this would be to use a single date parameter and specify the full date format including the hours to return the same result:
{host}-{date:yyyy-MM-dd-HH}.log


Adding hours to log file names

You can use any of the .NET Standard DateTime Format Strings or the .NET Custom DateTime Format Strings in the same way when setting the File Name Format or Log Folder options.

Contact Us

  • Post a Public Question
  • Email Us
support@fastvue.co
http://assets1.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete