Locating Logs for the Alpha Anywhere Application Server for IIS
Log files are useful for troubleshooting issues in web applications. The Alpha Anywhere Application Server for IIS writes events to the Xbasic Error log and Trace logs when abnormal conditions are encountered. The Application Server for IIS also writes to the Windows Event Logs. Failed Request Tracing can be used, as well, to track down failed requests.
The Alpha Anywhere Application Server for IIS writes information, such as errors, to logs located in several places: Trace logs, Xbasic Error log, and the Windows Event log. In the event of a process crash a mini-dump file may also be created. These files have a .dmp extension and are typically very large as they contain the state of the memory at the time of the crash.
Logs are a useful tool for tracking down issues in a web application. Knowing where to find the logs can be helpful in debugging your applications. You may also be asked to provide log files to Alpha Software Technical Support for the Application Server for IIS if you have submitted a support request.
To view the Trace, Xbasic Error logs, and mini-dump log (if any), open the IIS Management console. Select one of the deployed Alpha Anywhere sites (located under Sites) and open Logging.
Next, click Open Folder to open the folder that contains the Xbasic Error Log and the Trace logs folder.
In the directory, you will find the Trace folder, where trace logs are stored, and the Xbasic Error log. If nothing has been written to the Trace logs or the Xbasic Error log, the directory may be empty.
You can change where the Alpha Anywhere Application Server for IIS logs are stored by setting the Log Path property in the IIS publish profile.
Xbasic Error logging should always be enabled. In a production environment, log files should always be empty. If they are not empty, it may indicate a problem that needs addressing. You can enable Xbasic logging by checking the Enable Xbasic Logging property in the IIS publish profile and republishing your application.
Xbasic Error Logging can also be enabled through Logging for individual sites in the IIS Manager.
Information can be written to the Trace logs for debugging purposes in an application. The trace.writeln() method can be used to log information to the Trace logs. For example, the following code will log the current user to a Trace log called "Trace_CurrentUser.log":
dim currentuser as C dim traceLogName as C = "CurrentUser" dim message as C ' Get the current user currentuser = Context.Security.CurrentUser ' Build the message message = "Current User: " + currentuser ' Write the message to the "CurrentUser" trace log trace.writeln(message, traceLogName)
When this code is executed, the Trace_CurrentUser.log file is created and the message, "Current User: " + currentuser, is logged to the file:
Current User: [email protected]
Requests can fail outside the Alpha Anywhere Application Server for IIS. For these types of failures, Failed Request Tracing can be used to learn more information. Failed requests manifest as 4xx and 5xx errors. (See Tracking Down Request Failures to learn more.)
Errors or warning that occur outside of failed request tracing, such as activation failures, are written to the Windows event log with a source name "Alpha Anywhere V12 Application Server for IIS".