Manage Log Files
MATLAB® Production Server™ generates several log files when it starts. You can set server configuration properties to specify where and when to store and archive logs, as well as the level of details to log.
Best Practices for Log Management
Avoid placing log files and archived log files on different physical file systems.
Place log files on local drives, not on network drives.
Send MATLAB output to
stdout. Develop an appropriate, consistent logging strategy following MATLAB coding best practices.
Log Retention and Archive Settings
main_config server configuration file of a server instance
contains properties that you can set to manage log files. The
main.log file contains logs of server and worker processes
for as long as a specific server instance is active, or until midnight.
Specify the location of
main.logby setting the
When you restart the server, log data is written to an archive log. Specify the location of the archive log folder by setting the
You can specify when a server instance archives
setting the following properties in
main.logreaches this size, the active log is written to an archive log (located in the folder specified by l
log-archive-max-size— When the combined size of all files in the archive folder (location defined by
log-archive-root) reaches this limit, archive logs are purged until the combined size of all files in the archive folder is less than
log-archive-max-size. Oldest archive logs are deleted first.
Specify values for these properties using the following units and notations:
|Unit of Measurement||Notation||Example|
|Kilobyte (1024 bytes)|
|Megabytes (1024 kilobytes)|
|Gigabytes (1024 megabytes)|
|Terabytes (1024 gigabytes)|
|Petabytes (1024 terabytes)|
The minimum value you can specify for
On Windows® 32-bit systems, values larger than 232
bytes are not supported. For example, specifying
5g is not
valid on Windows 32-bit systems.
Log Detail Levels
Log levels provide different levels of information for troubleshooting. Set log
levels using the
log-severity server configuration
log-severity supports the following values:
error— Notification of problems or unexpected results
warning— Events that might lead to problems if unaddressed
information— High-level information about major server events
trace— Detailed information about the internal state of the server
Before you call technical support, set the log level to