
{"id":362,"date":"2009-12-02T23:35:56","date_gmt":"2009-12-03T04:35:56","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=362"},"modified":"2009-12-02T23:35:56","modified_gmt":"2009-12-03T04:35:56","slug":"where-to-put-log-files-in-windows","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=362","title":{"rendered":"Where to put log files in Windows?"},"content":{"rendered":"<p>Following up on the previous post. Linux (and UNIX in general) has a centralized location for logs: that&#8217;s \/var\/log. Windows does not. The original idea was that you are supposed to use Event Log, which is uniform, centralized and well understood. The problem is, however, that it is a proprietary format, it requires a special viewer to see, non-trivial configuration steps to start writing, its API is cumbersome, slow, and buggy, et cetera, et cetera.<\/p>\n<p>Writing log to plain text files is a deeply respected tradition that is not so easy to uproot. So, where does one put text log files on Windows? Many programs put it in &#8220;Program Files&#8221; alongside the code. The trouble is, this is now a protected area, and writing to the &#8220;Program Files&#8221; folder is generally considered a bad idea. Microsoft teams themselves seem to have a disagreement on the log location. System Restore, for example, writes to c:\\windows\\logs, while WMI goes to c:\\windows\\system32\\logfiles.<\/p>\n<p>The newest trend is to put the logs in c:\\programdata\\<i>programname<\/i>, but this makes logs hard to find, since Windows versions prior to Vista did not have the &#8220;c:\\ProgramData&#8221; directory.<\/p>\n<p>The bottom line is, there is no simple answer and every man is for himself.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following up on the previous post. Linux (and UNIX in general) has a centralized location for logs: that&#8217;s \/var\/log. Windows does not. The original idea was that you are supposed <a href=\"https:\/\/ikriv.com\/blog\/?p=362\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[4,5],"tags":[],"class_list":["entry","author-ikriv","post-362","post","type-post","status-publish","format-standard","category-hack","category-dev"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=362"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/362\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}