{"id":5244,"date":"2015-02-21T18:36:44","date_gmt":"2015-02-21T17:36:44","guid":{"rendered":"http:\/\/blog.wenzlaff.de\/?p=5244"},"modified":"2021-11-22T17:15:03","modified_gmt":"2021-11-22T16:15:03","slug":"eclipse-plugin-wie-kann-ein-logeintrag-in-der-error-log-view-erstellt-werden","status":"publish","type":"post","link":"http:\/\/blog.wenzlaff.de\/?p=5244","title":{"rendered":"Eclipse PlugIn: Wie kann ein Logeintrag in der Error Log View erstellt werden?"},"content":{"rendered":"<p>Bei der PlugIn Programmierung unter Eclipse Luna kann leicht auf die Log-View zugegriffen werden. Hier mal ein kleines Beispiel mit den verschiedenen Loglevel:<\/p>\n<pre class=\"lang:java decode:true \" >\r\nIStatus status = new Status(IStatus.INFO, \"TWPlugin\", \"Testeintrag im Log im Status Info\");\r\nStatusManager.getManager().handle(status, StatusManager.LOG);\r\n\r\nstatus = new Status(IStatus.ERROR, \"TWPlugin\", \"Testeintrag im Log im Status Error\");\r\nStatusManager.getManager().handle(status, StatusManager.LOG);\r\n\r\nstatus = new Status(IStatus.WARNING, \"TWPlugin\", \"Testeintrag im Log im Status Warning\");\r\nStatusManager.getManager().handle(status, StatusManager.LOG);\r\n\r\nstatus = new Status(IStatus.OK, \"TWPlugin\", \"Testeintrag im Log im Status OK\");\r\nStatusManager.getManager().handle(status, StatusManager.LOG);<\/pre>\n<p>So sieht es dann aus:<br \/>\n<figure id=\"attachment_5245\" aria-describedby=\"caption-attachment-5245\" style=\"width: 766px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/Bildschirmfoto-2015-02-21-um-18.28.35.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/Bildschirmfoto-2015-02-21-um-18.28.35.png\" alt=\"Eclipse Log Eintrag erstellen\" width=\"766\" height=\"165\" class=\"size-full wp-image-5245\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/Bildschirmfoto-2015-02-21-um-18.28.35.png 766w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/02\/Bildschirmfoto-2015-02-21-um-18.28.35-300x65.png 300w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/a><figcaption id=\"caption-attachment-5245\" class=\"wp-caption-text\">Eclipse Log Eintrag erstellen<\/figcaption><\/figure><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bei der PlugIn Programmierung unter Eclipse Luna kann leicht auf die Log-View zugegriffen werden. Hier mal ein kleines Beispiel mit den verschiedenen Loglevel: IStatus status = new Status(IStatus.INFO, &#8222;TWPlugin&#8220;, &#8222;Testeintrag im Log im Status Info&#8220;); StatusManager.getManager().handle(status, StatusManager.LOG); status = new Status(IStatus.ERROR, &#8222;TWPlugin&#8220;, &#8222;Testeintrag im Log im Status Error&#8220;); StatusManager.getManager().handle(status, StatusManager.LOG); status = new Status(IStatus.WARNING, &#8222;TWPlugin&#8220;, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/blog.wenzlaff.de\/?p=5244\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eEclipse PlugIn: Wie kann ein Logeintrag in der Error Log View erstellt werden?\u201c <\/span>weiterlesen<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,1975,79],"tags":[2177,1980,1981,293],"class_list":["post-5244","post","type-post","status-publish","format-standard","hentry","category-eclipse","category-java","category-plugin","category-programmierung","tag-eclipse","tag-error-log","tag-istatus","tag-plugin"],"_links":{"self":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/5244","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5244"}],"version-history":[{"count":0,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/5244\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5244"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}