<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Logging on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/logging/</link>
    <description>Recent content in Logging on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Mon, 30 Apr 2018 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/logging/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Analyzing Java Problems – Tools, Snippets and Workflows</title>
      <link>https://www.hascode.com/analyzing-java-problems-tools-snippets-and-workflows/</link>
      <pubDate>Mon, 30 Apr 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/analyzing-java-problems-tools-snippets-and-workflows/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When we need to investigate the cause for a dysfunctional Java application we have a plethora of tools available that on the one hand help us in gathering information, artifacts and statistics and on the other hand help us in processing this information and identifying possible problems.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following list of tools, snippets, workflows and information about specific artifacts could provide a starting point for analyzing such problems and covers topics like heap-dumps, thread-dumps, heap-histograms, heap-regions, garbage-collection-logs, hotspot-compiler/codecache-logs, debugging native-memory, tools for heap-dump-analysis, JVM unified logging and more..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE: Logging User Interaction the Aspect-Oriented Way using Interceptors</title>
      <link>https://www.hascode.com/java-ee-logging-user-interaction-the-aspect-oriented-way-using-interceptors/</link>
      <pubDate>Mon, 26 May 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-ee-logging-user-interaction-the-aspect-oriented-way-using-interceptors/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using dependency injection and aspect-oriented mechanisms like interceptors allow us to separate cross-cutting-concerns in our Java enterprise application, to control global aspects of our application and to avoid boilerplate code.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial we’re going to create an aspect-oriented logger to protocol the initiating user, class and method called and the parameters passed to the method and finally we’re adding this interceptor to a sample RESTful web-service by adding a simple annotation.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>First steps on Android: Creating a simple Todo App</title>
      <link>https://www.hascode.com/first-steps-on-android-creating-a-simple-todo-app/</link>
      <pubDate>Mon, 26 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/first-steps-on-android-creating-a-simple-todo-app/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we are going to build a simple todo app that is able to store simple todos in a database. The user is able to add new todos or delete old ones by clicking on a todo. For this tutorial we won’t use maven to keep it simple – if maven integration is desired – take a look at &lt;a href=&#34;https://www.hascode.com/../how-to-integrate-android-development-tools-and-maven/&#34;&gt;this tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a new android project using the &lt;a href=&#34;http://developer.android.com/sdk/index.html&#34;&gt;Android SDK&lt;/a&gt; and your IDE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create some packages &lt;em&gt;com.hascode.android.activity&lt;/em&gt; and &lt;em&gt;com.hascode.android.persistence&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the layout in &lt;em&gt;res/layout/main.xml&lt;/em&gt; – the main elements: a listview for the todos-list, a textbox and a button to enter new data.&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;
    &amp;lt;RelativeLayout
        android:id=&amp;#34;@+id/widget31&amp;#34;
        android:layout_width=&amp;#34;fill_parent&amp;#34;
        android:layout_height=&amp;#34;fill_parent&amp;#34;
        xmlns:android=&amp;#34;http://schemas.android.com/apk/res/android&amp;#34;
    &amp;gt;
        &amp;lt;TableRow
            android:id=&amp;#34;@+id/row&amp;#34;
            android:layout_width=&amp;#34;fill_parent&amp;#34;
            android:layout_height=&amp;#34;wrap_content&amp;#34;
            android:orientation=&amp;#34;horizontal&amp;#34;
            android:layout_below=&amp;#34;@+id/tasklist&amp;#34;
            android:layout_alignParentLeft=&amp;#34;true&amp;#34;
        &amp;gt;
            &amp;lt;EditText
                android:id=&amp;#34;@+id/etNewTask&amp;#34;
                android:layout_width=&amp;#34;200px&amp;#34;
                android:layout_height=&amp;#34;wrap_content&amp;#34;
                android:text=&amp;#34;&amp;#34;
                android:textSize=&amp;#34;18sp&amp;#34;
            &amp;gt;
            &amp;lt;/EditText&amp;gt;
            &amp;lt;Button
                android:id=&amp;#34;@+id/btNewTask&amp;#34;
                android:layout_width=&amp;#34;wrap_content&amp;#34;
                android:layout_height=&amp;#34;wrap_content&amp;#34;
                android:text=&amp;#34;@+string/add_button_name&amp;#34;
            &amp;gt;
            &amp;lt;/Button&amp;gt;
        &amp;lt;/TableRow&amp;gt;
        &amp;lt;ListView
            android:id=&amp;#34;@+id/tasklist&amp;#34;
            android:layout_width=&amp;#34;fill_parent&amp;#34;
            android:layout_height=&amp;#34;wrap_content&amp;#34;
            android:layout_alignParentTop=&amp;#34;true&amp;#34;
            android:layout_alignParentLeft=&amp;#34;true&amp;#34;
        &amp;gt;
        &amp;lt;/ListView&amp;gt;
&amp;lt;/RelativeLayout&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Snippets</title>
      <link>https://www.hascode.com/java-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/java-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_remote_debug_a_pods_java_process&#34;&gt;Remote Debug a Pod’s Java Process&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Simple steps for remote debugging a Java process running on a k8 pod:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Edit deployment and add the following parameters to the Java start line: &lt;code&gt;-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:5005&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Also add the following port mapping at the section &lt;code&gt;container → ports&lt;/code&gt; in the deployment:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;- containerPort: 5005
  protocol: TCP&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Safe, wait for the new pods and then add a port forward for port 5005 for this pod:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl port-forward podname 5005&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
