How to log method execution time

von.pasion's Avatar

von.pasion

21 Dec, 2017 12:54 PM

We are using the Log attribute and Loupe as our backend service and i don't see the execution time being logged.

  1. 1 Posted by von.pasion on 26 Dec, 2017 07:22 AM

    von.pasion's Avatar

    Never mind this, I was able to do it by adding a postsharp.config w/ this value:

    <?xml version="1.0" encoding="utf-8"?>
    <Project xmlns="http://schemas.postsharp.org/1.0/configuration">
      <Logging xmlns="clr-namespace:PostSharp.Patterns.Diagnostics;assembly:PostSharp.Patterns.Diagnostics">
        <Profiles>
          <LoggingProfile Name="Detailed" IncludeExecutionTime="True"/> 
        </Profiles>
      </Logging>
    </Project>
    
  2. Support Staff 2 Posted by PostSharp Techn... on 27 Dec, 2017 03:30 PM

    PostSharp Technologies's Avatar

    Hello,

    thank you for the update. Yes, this is the way.

    We are going to close this request as we believe it was solved. Please feel free to reopen the discussion if you need more help.

    Best regards,
    -tony

  3. PostSharp Technologies closed this discussion on 27 Dec, 2017 03:30 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac