Logging Packages with Log4J
The Pulse
Erik's Pulse has been published.
Logging Packages with Log4J
I was looking for a way to log a specific package to its own file using Log4J. Took me a while to figure it out, but here's what I came up with in my log4j.xml file:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<!-- Main Rolling Log (by Size) -->
<appender name="R" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="main.log"/>
<param name="Append" value="true"/>
<param name="MaxFileSize" value="10MB"/>
<param name="maxBackupIndex" value="10"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss}] [%p] %m%n"/>
</layout>
</appender>
<!-- MyPackage Rolling Log -->
<appender name="P" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="mypackage.log"/>
<param name="Append" value="true"/>
<param name="MaxFileSize" value="10MB"/>
<param name="maxBackupIndex" value="10"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss}] [%p] %m%n"/>
</layout>
</appender>
<!-- MyPackage Logger -->
<logger name="net.thauvin.erik.mypackage" additivity="false">
<appender-ref ref="P"/>
</logger>
<!-- Print only messages of priority INFO or above in the com.example package -->
<category name="com.example">
<priority value="info"/>
</category>
<!-- Root (Default) Logging -->
<root>
<priority value="fatal"/>
<appender-ref ref="R"/>
</root>
</log4j:configuration>
Incidentally, Log4j 1.2.13 was just released.
War of the Worlds
iFit & iWorkout
[@581]
Violation Notice Email
Hello Erik
We are sorry. The following question has been removed by our administrator due to violation of the rules.
Question: - Who's your daddy?Details of Violation:
Reason of Violation: The act of guessing at a riddle and other exchanges unrelated to Knowledge Service : Please post a legitimate question.
Point Deduction: -0
If you feel you were not in violation, please contact our Customer Care and tell us why.
Yahoo! Answers Team
The correct answer was Angelina Jolie. Yahoo! Answers has no sense of humor.
[@461]
iFit & i2Workout
On Monday we received our new NordicTrack C2300 treadmill. I had to enlist a neighbour's help to take it up to be bedroom.
I'm still pissed at Motor Cargo for only providing curb-side delivery. — Thanks Bill.
It took Vicki and I (yes, it is a two men's job) around 45 minutes to put it together. It came mostly assembled, except for the wheels, the console and the hydraulics.
I did my first workout on Tuesday morning. It's very silent and quite comfy, but I hate the presets (walk, jog, run). The custom options are a pain to setup too.
I decided to look into the iFit.com support. They do offer a few workout samples, but I'd have to hookup my laptop's audio to the treadmill to use them. CDs and MP3s are available at a cost. They also have premium services, which sound like a big joke to me.
Enters i2Workout, a nifty little shareware application that lets you create your own iFit-compatible workouts. It can export to MP3s (or CDs) with or without soundtracks.
I gave it a try last night with my Carbon, worked like a charm.
Pulsating
Confluence
Confluence 2.0.2 has been released. I just upgraded my wiki.
The Pulse
Erik's Pulse has been published.
Java Trademark Infringement
[@917]
Java Trademark Infringement
I just received the following:
Dear Erik Thauvin:
While reviewing your company's application, we noticed a potential misuse of a Sun trademark. Sun Microsystems has a trademark policy that describes how to make proper use of the trademarks and brands associated with Sun's products and services. The current Sun Trademark and Logo Usage Requirements are available online at http://www.sun.com/policies/trademarks/. If you still have trademark-related questions after reviewing the policy, you may contact Sun's Trademarks and Brands Department at [email protected].
Please incorporate on your Company website http://www.skytouch.com/soft/java/index.htm, 'Java and all Java-based marks' are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
Your application for renewal will be placed on hold until the Java Legend is incorporated on your Company's website.
If you have any additional questions about the Sun Partner Advantage Program or any of it's offerings, or if you would like assistance, please contact our office at the number or email address below.
Best regards,
David Silver
Sun Partner Advantage Program Contact Center
Phone: 1-800-945-6111
Fax: 1-800-215-702-2501
Email: [email protected]
Here's what I responded:
David:
The site in question has the following statement in all of its sidebars:
"Copyright © 2003 SkyTouch Communications. All rights reserved. All trademarks are the property of their respective holders."
I believe that it is in compliance with Sun's trademark/logo usage requirements.
Sincerely,
Erik C. Thauvin
SkyTouch Communications
Phone: +1 (425) 329-3376
Someone has to be kidding me.
[@938]
I got the following response:Dear Erik Thauvin:
Thank you for your e-mail. You have indicated in the following statement on your website: Our Java software are freeware. If you use them and enjoy them, donations are a great way of saying thanks. The sentence should read as follows: Our Java-based software are freeware.
Once this has been corrected, we will continue with the processing of your application.
Should you have any questions, please feel free to contact me.
Best regards,
David Silver
Sun Partner Advantage Program Contact Center
Phone: 1-800-945-6111
Fax: 1-215-702-2501
Email: [email protected]I've made the change, because I've already wasted too much time on this. Un-freaking-believable.



