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:


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:

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
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found