
Configuring the Maximum Size of Each Protocol Log File
By default, the maximum size for each protocol log file is 10 MB. All Receive connectors on the server share the same protocol log files, and all Send connectors on the server share the same protocol log files. When a protocol log file reaches its maximum size, Exchange 2007 opens a new protocol log file. This process continues until either of the following conditions is true:
-
The protocol log directory reaches its specified maximum size. For more information about how to change the maximum size of the protocol log directory, see "Configuring the Maximum Size of the Protocol Log Directory" later in this topic.
-
A protocol log file reaches its specified maximum age. For more information about how to change the maximum age for a protocol log file, see "Configuring the Maximum Age for the Protocol Log Files" later in this topic.
After the maximum size or age limit is reached, circular logging deletes the oldest protocol log files.

To use the Exchange Management Shell to change the maximum size of Receive connector protocol log files
-
Run the following command:
|
Set-TransportServer <Identity> -ReceiveProtocolLogMaxFileSize <FileSize> |
For example, to set the maximum size of Receive connector protocol log files to 20 MB on an Exchange 2007 computer named Exchange01, run the following command:
|
Set-TransportServer Exchange01 -ReceiveProtocolLogMaxFileSize 20MB |
Configuring the Maximum Size of the Protocol Log Directory
By default, the maximum size for the whole protocol log directory is 250 MB. All Receive connectors on the server share the same protocol log directory, and all Send connectors on the server share the same protocol log directory. Circular logging deletes the oldest protocol log files when either of the following conditions is true:
-
The protocol log directory reaches its specified maximum size.
-
A protocol log file reaches its specified maximum age.
Note: |
|---|
|
By default, the transport logging process has a logging level value of 0 (Lowest). If you want Microsoft Exchange to write an event log entry when circular logging removes a log file, you must change the logging level value of the transport logging process to 5 (Maximum) or 7 (Expert). For more information, see How to Change Logging Levels for Exchange Processes.
|

To use the Exchange Management Shell to change the maximum size of the Receive connector protocol log directory
-
Run the following command:
|
Set-TransportServer <Identity> -ReceiveProtocolLogMaxDirectorySize <DirectorySize> |
For example, to set the maximum size of the Receive connector protocol log directory to 400 MB on an Exchange 2007 computer named Exchange01, run the following command:
|
Set-TransportServer Exchange01 -ReceiveProtocolLogMaxDirectorySize 400MB |

To use the Exchange Management Shell to change the maximum size of the Send connector protocol log directory
-
Run the following command:
|
Set-TransportServer <Identity> -SendProtocolLogMaxDirectorySize <DirectorySize> |
For example, to set the maximum size of the Send connector protocol log directory to 400 MB on an Exchange 2007 computer named Exchange01, run the following command:
|
Set-TransportServer Exchange01 -SendProtocolLogMaxDirectorySize 400MB |
When you enter a value for either parameter, qualify the value with one of the following units:
-
B (bytes)
-
KB (kilobytes)
-
MB (megabytes)
-
GB (gigabytes)
-
TB (terabytes)
Unqualified values are treated as bytes. The value of the ReceiveProtocolLogMaxFileSize parameter must be less than or equal to the value of the ReceiveProtocolLogMaxDirectorySize parameter. The value of the SendProtocolLogMaxFileSize parameter must be less than or equal to the value of the SendProtocolLogMaxDirectorySize parameter. The valid input range for any of these parameters is 1 to 9223372036854775807 bytes.
Configuring the Maximum Age for the Protocol Log Files
By default, the maximum age for any protocol log file is 30 days. All Receive connectors on the server share the same protocol log files, and all Send connectors on the server share the same protocol log files. Circular logging deletes the oldest protocol log files if either of the following conditions is true:
-
The protocol log directory reaches its specified maximum size.
-
A protocol log file reaches its specified maximum age.
Note: |
|---|
|
By default, the transport logging process has a logging level value of 0 (Lowest). If you want Microsoft Exchange to write an event log entry when circular logging removes a log file, you must change the logging level value of the transport logging process to 5 (Maximum) or 7 (Expert). For more information, see How to Change Logging Levels for Exchange Processes.
|

To use the Exchange Management Shell to set the maximum age of the Receive connector protocol log files
-
Run the following command:
|
Set-TransportServer <Identity> -ReceiveProtocolLogMaxAge <Age> |
For example, to set the age limit of the Receive connector protocol log files to 45 days on an Exchange 2007 computer named Exchange01, run the following command:
|
Set-TransportServer Exchange01 -ReceiveProtocolLogMaxAge 45.00:00:00 |

To use the Exchange Management Shell to set the maximum age of the Send connector protocol log files
-
Run the following command:
|
Set-TransportServer <Identity> -SendProtocolLogMaxAge <Age> |
For example, to set the age limit of the Send connector protocol log files to 45 days on an Exchange 2007 computer named Exchange01, run the following command:
|
Set-TransportServer Exchange01 -SendProtocolLogMaxAge 45.00:00:00 |
To specify an age value, enter the value as a time span: dd.hh:mm:ss, where d = days, h = hours, m = minutes, and s = seconds. The valid input range for this parameter is 00:00:00 to 24855.03:14:07. Setting the value of the ReceiveProtocolLogMaxAge parameter or the SendProtocolLogMaxAge parameter to 00:00:00 prevents the automatic removal of protocol log files because of their age.