{"id":80,"date":"2009-08-21T07:12:00","date_gmt":"2009-08-21T07:12:00","guid":{"rendered":"https:\/\/wdev-blog.azurewebsites.net\/index.php\/2009\/08\/21\/tip-to-log\/"},"modified":"2009-08-21T07:12:00","modified_gmt":"2009-08-21T07:12:00","slug":"tip-to-log","status":"publish","type":"post","link":"http:\/\/panahy.nl\/index.php\/2009\/08\/21\/tip-to-log\/","title":{"rendered":"Tip To Log"},"content":{"rendered":"<p>We often like to know what happens in a procedure and also we  like to figure out if we see something in the log, where in the code it happened. Therefore it is handy to start and end each procedure with log. To do this we can put a small generic code like this<\/p>\n<p><code style=\"font-family:consolas,courier new;\">Trace.WriteLine(\"Beginning with \" + System.Reflection.<strong>MethodInfo.GetCurrentMethod<\/strong>().Name);<br \/><\/code><br \/>it will work just fine<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We often like to know what happens in a procedure and also we like to figure out if we see something in the log, where in the code it happened. Therefore it is handy to start and end each procedure with log. To do this we can put a small generic code like this Trace.WriteLine(&#8220;Beginning &hellip; <a href=\"http:\/\/panahy.nl\/index.php\/2009\/08\/21\/tip-to-log\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Tip To Log&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[73],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"Pouya Panahy","author_link":"http:\/\/panahy.nl\/index.php\/author\/pouya\/"},"uagb_comment_info":1,"uagb_excerpt":"We often like to know what happens in a procedure and also we like to figure out if we see something in the log, where in the code it happened. Therefore it is handy to start and end each procedure with log. To do this we can put a small generic code like this Trace.WriteLine(\"Beginning&hellip;","_links":{"self":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/80"}],"collection":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/comments?post=80"}],"version-history":[{"count":0,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/80\/revisions"}],"wp:attachment":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/media?parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/categories?post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/tags?post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}