You can use the MDrivenServer log to inspect server activity, follow failures, and correlate entries produced by the same server-side job.
Open the log in the MDrivenServer UI
Use the built-in MDrivenServer administration UI when you need to inspect activity in the running MDrivenServer.
- Sign in to MDrivenServer with an account that can access administration.
- Open
admin/Log.aspxon the MDrivenServer site. - Review the newest entries and locate the time at which the problem occurred.
For example, if a scheduled server-side action failed at 10:15, find entries around 10:15 and follow the entries that have the same job identifier.
Correlate entries from one server-side job
MDrivenServer can execute several jobs in parallel. Their log entries can therefore be interleaved in the UI log.
Each job has a number shown with its entries. Use that number to group related messages together. Do not assume that adjacent entries belong to the same action.
| Situation | What to do |
|---|---|
| Entries from several actions appear mixed together | Find the job number on the entry of interest, then follow other entries with that same number. |
| An action appears to be taking a long time | Use the job number to identify its log entries, then investigate server-side execution with Documentation:Debugging MDrivenServer Serverside actions. |
| You need the raw rolling log file rather than the UI | Use the browser, Azure SCM, server-file, or PowerShell methods in Documentation:Turnkey and MDrivenServer logs. |
Add messages from your own server-side work
You can add diagnostic text to the MDrivenServer log from server-side ViewModel work with LogEntry. In OCL, use the LogEntry operator on the ViewModel.
selfVM.LogEntry('Import started for customer ' + self.CustomerNumber)
This message is written to the log files under /logs and helps you identify the execution path and values relevant to a failure. See Documentation:OCLOperators LogEntry for the operator details.
Logging requires the IIS account that runs the application to have write access to the application's Logs folder. If you receive an error and no log is produced, check the identity of the IIS application pool and its folder permissions.
MDrivenServer also attempts to write exceptions to the Windows Event Log. If its process account is not permitted to write there, the MDrivenServer log records that failure. Follow Documentation:Eventlog to grant the required Event Log permission.
For general application status and Turnkey diagnostic information, see Documentation:Serverinfo.
Use the right log location
The built-in UI log is useful for inspecting MDrivenServer activity. For direct access to rolling debug and error files, including access from Azure SCM or a server command line, use Documentation:Turnkey and MDrivenServer logs. That page also explains log rotation: the current log file is the file without an odd extension.
