arrow-left arrow-right brightness-2 chevron-left chevron-right circle-half-full dots-horizontal facebook-box facebook loader magnify menu-down RSS star Twitter twitter GitHub white-balance-sunny window-close
Magellan Diagnostics
2 min read

Magellan Diagnostics

This is an old post and doesn't necessarily reflect my current thinking on a topic, and some links or images may not work. The text is preserved here for posterity.

Back to: Magellan Home

Magellan makes use of TraceSources internally for providing diagnostic information. By default nothing is traced, but you can configure the trace sources to see details.

Configuring the trace sources can be done through the application configuration file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.diagnostics>
    <sources>
      <source name="Magellan" switchValue="Verbose">
        <listeners>
          <clear />
          <add name="Console" type="System.Diagnostics.ConsoleTraceListener" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>
</configuration>

Or through code, for example, in the App.xaml code behind:

Magellan.Diagnostics.TraceSources.MagellanSource.Switch.Level = SourceLevels.Verbose;

Here is an example of what is logged at the Information level:

Magellan Information: 0 : The Navigator is executing the request 'Controller=Home; Action=Home; RequestID=6ce8e373-f2d9-48d0-b1c2-9438094feeaf'.
Magellan Information: 0 : Controller 'iPhone.Applications.Home.Controllers.HomeController' is executing request 'Controller=Home; Action=Home; RequestID=6ce8e373-f2d9-48d0-b1c2-9438094feeaf'.
Magellan Information: 0 : The PageViewEngine is rendering the page 'iPhone.Applications.Home.Views.HomeView'.
Magellan Information: 0 : Request completed: 'Controller=Home; Action=Home; RequestID=6ce8e373-f2d9-48d0-b1c2-9438094feeaf'.

Here is what is logged at the Verbose level:

Magellan Information: 0 : The Navigator is executing the request 'Controller=Home; Action=Home; RequestID=2704ddc6-0dca-412f-88fc-b08a008ee586'.
Magellan Verbose: 0 : Resolving controller 'Home' for request 'Controller=Home; Action=Home; RequestID=2704ddc6-0dca-412f-88fc-b08a008ee586'
Magellan Information: 0 : Controller 'iPhone.Applications.Home.Controllers.HomeController' is executing request 'Controller=Home; Action=Home; RequestID=2704ddc6-0dca-412f-88fc-b08a008ee586'.
Magellan Verbose: 0 : DefaultActionInvoker found the action 'Home' as method 'Magellan.Framework.ActionResult Home()'
Magellan Verbose: 0 : DefaultActionInvoker found the following action filters for action 'Home': ''.
Magellan Verbose: 0 : DefaultActionInvoker found the following result filters for action 'Home': ''.
Magellan Verbose: 0 : The ViewEngineCollection is consulting the view engine 'Magellan.Framework.PageViewEngine' for the view 'Home'.
Magellan Information: 0 : The PageViewEngine is rendering the page 'iPhone.Applications.Home.Views.HomeView'.
Magellan Verbose: 0 : The PageViewEngine has navigated to the page 'iPhone.Applications.Home.Views.HomeView'.
Magellan Verbose: 0 : The PageViewEngine is clearing the navigation history.
Magellan Information: 0 : Request completed: 'Controller=Home; Action=Home; RequestID=2704ddc6-0dca-412f-88fc-b08a008ee586'.

The Warning and Error levels are rarely used - warning is used when Magellan decides on a course of action that is potentially incorrect, and errors are usually logged before an exception is thrown.

See also:

Back to: Magellan Home

Enjoying these posts? Subscribe for more

Subscribe now
Already have an account? Sign in
Paul Stovell's Blog

Hello, I'm Paul Stovell

I'm a Brisbane-based software developer, and founder of Octopus Deploy, a DevOps automation software company. This is my personal blog where I write about my journey with Octopus and software development.

I write new blog posts about once a month. Subscribe and I'll send you an email when I publish something new.

Subscribe

Comments

You've successfully subscribed to Paul Stovell's Blog.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.