{"id":1569,"date":"2012-07-07T15:00:00","date_gmt":"2012-07-07T15:00:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/logback-application-errors-notification.html"},"modified":"2014-02-18T09:28:54","modified_gmt":"2014-02-18T07:28:54","slug":"logback-application-errors-notification","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html","title":{"rendered":"Logback: Application errors notification"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">Some months ago when I was doing big application refactoring I found really annoying pieces of <a href=\"http:\/\/logging.apache.org\/log4j\/\">log4j<\/a> based code used for logging repeated hundreds of times:<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<pre class=\"brush:java\">if (LOG.isDebugEnabled()) {\r\n    LOG.debug(\"Logging some stuff = \" + stuff);\r\n}\r\n<\/pre>\n<p>I wanted to get rid of isXXXEnabled an thats how I found <a href=\"http:\/\/logback.qos.ch\/\">Logback<\/a> and <a href=\"http:\/\/www.slf4j.org\/\">SLF4J<\/a>.         <strong>&nbsp;<\/strong><\/p>\n<p><strong>Logback and SLF4J<\/strong>        <\/p>\n<p>Logback in conjunction with SLF4J provides great API and fast and powerful implementation of logging framework. Reasons why to switch to Logback from log4j are not topic of this post and they are already described in details on <a href=\"http:\/\/logback.qos.ch\/reasonsToSwitch.html\">logback website<\/a>. Just in short notice what do you get with Logback and SL4FJ:         <\/p>\n<ul>\n<li>simple and fast way to skip isXXXEnabled with:\n<pre class=\"brush:java\"> LOG.debug(\"Logging some stuff = {}\", stuff);<\/pre>\n<\/li>\n<li>automatic reloading of configuration files<\/li>\n<li>powerful logging filters<\/li>\n<li>loading properties file into configuration xml<\/li>\n<li>conditional configuration<\/li>\n<\/ul>\n<p>Thanks to <a href=\"http:\/\/www.slf4j.org\/migrator.html\">SLF4J migration tool<\/a> migration from log4j api to SLF4J is super fast. I\u2019ve decided to switch all projects to Logback and after several months I have to say that I am really satisfied with that decision.         <\/p>\n<p>In order to use Logback in your project add following dependencies:         <\/p>\n<pre class=\"brush:xml\">&lt;dependency&gt;\r\n    &lt;groupId&gt;org.slf4j&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;slf4j-api&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.6.4&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;ch.qos.logback&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;logback-classic&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.0.1&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;org.slf4j&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;jcl-over-slf4j&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.6.4&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n<\/pre>\n<p><strong>Setting up error notifications with Logback<\/strong>        <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>In application with proper logging every entry logged with level ERROR should be considered as a problem that should be fixed.         <\/p>\n<p>Most common way of logging errors is of course logging exceptions with stacktraces to logfile but if you have plenty of applications on several hosts checking for errors can be time consuming. Smarter way is to log them into database \u2013 that can be achieved with <a href=\"http:\/\/logback.qos.ch\/apidocs\/ch\/qos\/logback\/classic\/db\/DBAppender.html\">DBAppender<\/a>. I found the most helpful to send all exceptions on my email to be able to fix them immediately.         <\/p>\n<p>In order to setup Logback to send mails with exceptions we need to add Java Mail dependency:         <\/p>\n<pre class=\"brush:xml\">&lt;dependency&gt;\r\n    &lt;groupId&gt;javax.mail&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;mail&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.4&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n<\/pre>\n<p>And define configuration for SMTPAppender in logback.xml:         <\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;configuration&gt;\r\n    &lt;!-- some application specific configuration here --&gt;\r\n\r\n    &lt;appender name=\"sheriff\" class=\"ch.qos.logback.classic.net.SMTPAppender\"&gt;\r\n  &lt;smtpHost&gt;localhost&lt;\/SMTPHost&gt;\r\n  &lt;from&gt;sheriff@mycompany.com&lt;\/From&gt;\r\n  &lt;to&gt;john@mycompany.com&lt;\/To&gt;\r\n  &lt;subject&gt;Something went wrong&lt;\/Subject&gt;\r\n  &lt;layout class=\"ch.qos.logback.classic.html.HTMLLayout\"\/&gt;\r\n\r\n  &lt;filter class=\"ch.qos.logback.classic.filter.ThresholdFilter\"&gt;\r\n   &lt;level&gt;ERROR&lt;\/level&gt;\r\n  &lt;\/filter&gt;\r\n &lt;\/appender&gt;\r\n\r\n    &lt;root level=\"ERROR\"&gt;\r\n        &lt;appender-ref ref=\"sheriff\" \/&gt;\r\n    &lt;\/root&gt;\r\n&lt;\/configuration&gt;\r\n<\/pre>\n<p>Thanks to ThresholdFilter with level set to ERROR we are sure that even if root level will be changed \u2013 only error mails will be sent.         <\/p>\n<p>Now you should get emails that look similar to:         <\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/4.bp.blogspot.com\/-hL9o135zSy4\/T_cJ_gF2brI\/AAAAAAAAAns\/1c0HrohAYJQ\/s1600\/Screen-shot-2012-04-03-at-22.59.49.png\"><img decoding=\"async\" border=\"0\" height=\"406\" src=\"http:\/\/4.bp.blogspot.com\/-hL9o135zSy4\/T_cJ_gF2brI\/AAAAAAAAAns\/1c0HrohAYJQ\/s640\/Screen-shot-2012-04-03-at-22.59.49.png\" width=\"640\" \/><\/a><\/div>\n<p><strong>Skipping error notifications in dev environment<\/strong>        <\/p>\n<p>Probably you will not need to receive those mails coming from development environment and thanks to conditionals in logback configuration you can easily skip them.         <\/p>\n<p>In order to use conditionals you need to add dependency to <a href=\"http:\/\/docs.codehaus.org\/display\/JANINO\/Home\">Janino<\/a>:         <\/p>\n<pre class=\"brush:xml\">&lt;dependency&gt;\r\n    &lt;groupId&gt;janino&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;janino&lt;\/artifactId&gt;\r\n    &lt;version&gt;2.5.10&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n<\/pre>\n<p>Next thing is to know whats your environment. In Logback configuration you can access system properties, logback properties or special variables like HOSTNAME and CONTEXT_NAME and them to determine your environment. In my application <a href=\"http:\/\/maciejwalkowiak.pl\/blog\/2012\/03\/27\/spring-3-1-profiles-and-tomcat-configuration\/\">I use Spring profiles<\/a> for that so my ROOT logger configuration is:         <\/p>\n<pre class=\"brush:xml\">&lt;root level=\"ERROR\"&gt;\r\n    &lt;if condition='\"${spring.profiles.active}\" == \"production\"'&gt;\r\n        &lt;appender-ref ref=\"sheriff\" \/&gt;\r\n    &lt;\/if&gt;\r\n&lt;\/root&gt;\r\n<\/pre>\n<p><strong>Few words for log4j users<\/strong>        <\/p>\n<p>If you decide to stick to log4j you can use it\u2019s <a href=\"http:\/\/wiki.apache.org\/logging-log4j\/SMTPAppender\">SMTPAppender<\/a>.         <\/p>\n<p>Log4j can be used together with SLF4J thanks to <a href=\"http:\/\/www.slf4j.org\/legacy.html#log4j-over-slf4j\">log4j-over-slf4j<\/a> library.         <strong>&nbsp;<\/strong><\/p>\n<p><strong>Conclusion<\/strong>        <\/p>\n<p>Sending mails with Logback is not the only way to notify about errors. Its possible to use <a href=\"https:\/\/github.com\/cosmocode\/logback-xmpp\">Jabber appender<\/a> or even write appender that would send errors through SMS gateway. Its up to you.         <\/p>\n<p>What solutions for error notifications do you use in your projects? <\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/maciejwalkowiak.pl\/blog\/2012\/04\/03\/application-errors-notification-with-logback\/\">Application errors notification with Logback <\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Maciej Walkowiak at the <a href=\"http:\/\/maciejwalkowiak.pl\/\">Software Development Journey<\/a> blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Some months ago when I was doing big application refactoring I found really annoying pieces of log4j based code used for logging repeated hundreds of times: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (LOG.isDebugEnabled()) { LOG.debug(&#8220;Logging some stuff = &#8221; + stuff); } I wanted to get rid of isXXXEnabled an thats &hellip;<\/p>\n","protected":false},"author":245,"featured_media":183,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[246,132],"class_list":["post-1569","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-logback","tag-logging"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Logback: Application errors notification - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Some months ago when I was doing big application refactoring I found really annoying pieces of log4j based code used for logging repeated hundreds of\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Logback: Application errors notification - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Some months ago when I was doing big application refactoring I found really annoying pieces of log4j based code used for logging repeated hundreds of\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2012-07-07T15:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-02-18T07:28:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/logback-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Maciej Walkowiak\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Maciej Walkowiak\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html\"},\"author\":{\"name\":\"Maciej Walkowiak\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/918c1b6d9d8de83830e5b24c0f0f4419\"},\"headline\":\"Logback: Application errors notification\",\"datePublished\":\"2012-07-07T15:00:00+00:00\",\"dateModified\":\"2014-02-18T07:28:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html\"},\"wordCount\":534,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/logback-logo.jpg\",\"keywords\":[\"Logback\",\"Logging\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html\",\"name\":\"Logback: Application errors notification - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/logback-logo.jpg\",\"datePublished\":\"2012-07-07T15:00:00+00:00\",\"dateModified\":\"2014-02-18T07:28:54+00:00\",\"description\":\"Some months ago when I was doing big application refactoring I found really annoying pieces of log4j based code used for logging repeated hundreds of\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/logback-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/logback-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/logback-application-errors-notification.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Logback: Application errors notification\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/918c1b6d9d8de83830e5b24c0f0f4419\",\"name\":\"Maciej Walkowiak\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/897c85e1c7fe1b9b9ed640f6ff04c5f2141980d6c5c2b933034783495c8e8db5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/897c85e1c7fe1b9b9ed640f6ff04c5f2141980d6c5c2b933034783495c8e8db5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/897c85e1c7fe1b9b9ed640f6ff04c5f2141980d6c5c2b933034783495c8e8db5?s=96&d=mm&r=g\",\"caption\":\"Maciej Walkowiak\"},\"sameAs\":[\"http:\\\/\\\/maciejwalkowiak.pl\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Maciej-Walkowiak\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Logback: Application errors notification - Java Code Geeks","description":"Some months ago when I was doing big application refactoring I found really annoying pieces of log4j based code used for logging repeated hundreds of","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html","og_locale":"en_US","og_type":"article","og_title":"Logback: Application errors notification - Java Code Geeks","og_description":"Some months ago when I was doing big application refactoring I found really annoying pieces of log4j based code used for logging repeated hundreds of","og_url":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-07-07T15:00:00+00:00","article_modified_time":"2014-02-18T07:28:54+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/logback-logo.jpg","type":"image\/jpeg"}],"author":"Maciej Walkowiak","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Maciej Walkowiak","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html"},"author":{"name":"Maciej Walkowiak","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/918c1b6d9d8de83830e5b24c0f0f4419"},"headline":"Logback: Application errors notification","datePublished":"2012-07-07T15:00:00+00:00","dateModified":"2014-02-18T07:28:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html"},"wordCount":534,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/logback-logo.jpg","keywords":["Logback","Logging"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html","url":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html","name":"Logback: Application errors notification - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/logback-logo.jpg","datePublished":"2012-07-07T15:00:00+00:00","dateModified":"2014-02-18T07:28:54+00:00","description":"Some months ago when I was doing big application refactoring I found really annoying pieces of log4j based code used for logging repeated hundreds of","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/logback-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/logback-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/logback-application-errors-notification.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Logback: Application errors notification"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/918c1b6d9d8de83830e5b24c0f0f4419","name":"Maciej Walkowiak","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/897c85e1c7fe1b9b9ed640f6ff04c5f2141980d6c5c2b933034783495c8e8db5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/897c85e1c7fe1b9b9ed640f6ff04c5f2141980d6c5c2b933034783495c8e8db5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/897c85e1c7fe1b9b9ed640f6ff04c5f2141980d6c5c2b933034783495c8e8db5?s=96&d=mm&r=g","caption":"Maciej Walkowiak"},"sameAs":["http:\/\/maciejwalkowiak.pl"],"url":"https:\/\/www.javacodegeeks.com\/author\/Maciej-Walkowiak"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/245"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1569"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1569\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/183"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}