# View Log Files

Use this panel to view/download log files and to collect log files and diagnostic data.

#### View/Download Log Files

To assist in troubleshooting, you can either view or download the log files generated by the services running on your server.

To view/download the log files:

1. Under Administration, click View log files.

2. Under View Log Files, choose a log view. Most system services write their logs to the "messages" file.

3. Enter a Filter Pattern to view online the lines of the log that contain that text. This option applies only to viewed files. Check the Regular expression box if you want to apply the text filter in the format of a regular expression.
   A regular expression (abbreviated as regexp, regex, or regxp) is a string that describes or matches a set of strings, such as particular characters, words, or patterns of characters, according to certain syntax rules. A regular expression is written in a formal language that can be interpreted by a regular expression processor, a program that either serves as a parser generator or examines text and identifies parts that match the provided specification.

4. Specify a Highlight Pattern to mark in bold the specified text in any logs that the text appears. This option applies only to viewed files. Check the Regular expression box if you want to apply the text filter in the format of a regular expression.

5. From Operation, select View log file or Download.

6. Click Next. If you selected View log file, the log files are displayed.

Note: The system automatically updates the list every 5 seconds with any new logs.

#### Collect Log Files and Diagnostic Data

This utility allows system-level logs to be collected for the server platform and then saved to another location such as your local PC. Logs can be selected for collection from specific applications.

To collect and save log files:

1. Under Administration, click View log files.

2. Under Collect log files & diagnostic data, select which categories you wish to collect. To minimize the size of the log file, uncheck categories you do not require.

Note: Coredump log files can be very large and take a long time to collect. It is recommended that you uncheck the "Coredump files" category.

3. Click Start. A progress indicator appears while the logs are being collected.

Note: You can navigate to other screens without interrupting the process.

4. When the log collection process finishes, the indicator changes to "Complete / 100%" and the archived log file is listed on the screen. Depending on which type of web browser you are using, a copy of the file will be downloaded automatically or you will be prompted to save it.

5. You can manage the list of archived log files as follows:

1. - To save and encrypt a file, click Encrypt Download, enter a Password, and then re-enter it. Create a strong password by using a mix of characters, numbers and symbols, plus both upper and lower case characters. Click Continue. An encrypted tar file with the filename "sosreport-<file>.tar.gz.aes256" is saved to the Downloads folder.

   - To save a file without encrypting it, click Download. A tar file with the filename "sosreport-<file>.tar.bz2" is saved to the Downloads folder.

   - To delete a file, click Delete, and then click OK. The archived log file is deleted from the server.

After saving an archived log file, send it to Mitel Product Support for analysis. If the file is encrypted, also send the password. Without it, the file cannot be decrypted.

Notes:

- To decrypt an encrypted log file, transfer the file to a Linux system, access a console on the system, and then enter the following command: openssl enc -aes-256-cbc -d -in filename -out newfilename. When prompted, enter the password used to encrypt the file. If you only have access to a Windows system, use a Unix emulator such as CygWin to perform these steps.

- Archived log files are automatically deleted from the server after 72 hours.

- You can also manage the archived log files from the MSL shell. The files are located on the server in /var/cache/e-smith/logcollector.

- For MSL-based versions of MiVoice Business, collecting logs is a multi-step process:

1. 1. In the MSL Server Manager, access the View logs files screen and select the Collect MCD logs check box.

   2. In the MiVoice Business System Administration Tool, access the System Diagnostics form, run the System Diagnostics and package the log files.

   3. In the MSL Server Manager, access the View logs files screen and click Start to collect the logs.