| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Sat, 27 Dec 2025 03:01:52 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20070724060841
location: https://web.archive.org/web/20070724060841/https://pencil.dev.java.net/
server-timing: captures_list;dur=0.511211, exclusion.robots;dur=0.037088, exclusion.robots.policy;dur=0.026090, esindex;dur=0.010529, cdx.remote;dur=5.937313, LoadShardBlock;dur=127.440860, PetaboxLoader3.datanode;dur=60.856532, PetaboxLoader3.resolve;dur=6.191761
x-app-server: wwwb-app214-dc8
x-ts: 302
x-tr: 167
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app214; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Sat, 27 Dec 2025 03:01:53 GMT
content-type: text/html;charset=UTF-8
x-archive-orig-date: Tue, 24 Jul 2007 06:08:45 GMT
x-archive-orig-server: Apache
x-archive-orig-x-powered-by: Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)/Tomcat-5.5
x-archive-orig-pragma:
x-archive-orig-cache-control: private,max-age=0,must-revalidate
x-archive-orig-helmloginid: guest
x-archive-orig-connection: close
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Tue, 24 Jul 2007 06:08:41 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: IA-AROUND-THE-WORLD-2007-20070724050317-20018-crawling06-c/IA-AROUND-THE-WORLD-2007-20070724060254-08147-crawling01.us.archive.org.arc.gz
server-timing: captures_list;dur=1.113841, exclusion.robots;dur=0.016397, exclusion.robots.policy;dur=0.007620, esindex;dur=0.008543, cdx.remote;dur=8.853824, LoadShardBlock;dur=83.027116, PetaboxLoader3.datanode;dur=100.640930, PetaboxLoader3.resolve;dur=59.020670, load_resource;dur=124.092537
x-app-server: wwwb-app214-dc8
x-ts: 200
x-tr: 259
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
pencil: Project Home Page
|
pencil
|
| Summary | Pencil - a log-message-compiler for java. |
|---|---|
| Categories | None |
| License | GNU General Public License (GPL v. 2.0) |
| Owner(s) | nestor_kodila |
Message from the owner(s)
|
Aug 20, 2005: Version 0.2.3 (codename: yellow) released See the the list of changes for details. You can download this version here. Jul 23, 2005: Version 0.2.2 (codename: green) released See the the list of changes for details. You can download this version here. Jun 20, 2005: I've added a short german description of this project You can read it here. An english version will follow. Jun 18, 2005: I've joined to the web demo against software patents See here for more information. May 25, 2005: Version 0.2.1 released See the the list of changes for details. |
![]() |
Logging with Pencil and commons-logging.
Fast and safe way to log.
What is "Pencil" and how i can eat it?
"Pencil" is a log-message-compiler for java (keyword: generative programming). It takes bytecode produced by javac (or another java-compiler), transforms it and enriches it with real logging expressions.The main goal of the "Pencil" project is to provide a mechanism to make logging easy, safe and fast. To achieve this result, "Pencil" uses its own expression language developed with the ANTLR parser-generator. But have no fear! "Pencil" is not a Language-extension. You don't need a special IDE with a new source-code viewer. There's no need to extend the syntax of java to use pencil and your code will look cleaner than it did before.
To log some stuff you simply use a class from "Pencil"-framework within your java-code. Pencil behaves kind of like a logging plugin to your code.
Example:
class MyClass {
private String var1;
private MyOtherClass var2;
public MyClass() {
LOGGER.info("begin with initialization" );
doSomething();
LOGGER.debug( "some additional vars initialized; var1 =${var1}/
var2.name = ${var2.name}");
}
}
The above example is then transformed to the following code:
class MyClass {
private static final Log LOGGER = LogFactory.getLog( MyClass.class );
private String var1;
private MyOtherClass var2;
public MyClass() {
if( LOGGER.isInfoEnabled() )
LOGGER.info("begin with initialization" );
doSomething();
if( LOGGER.isDebugEnabled() ) {
String tempVar;
if(var2 != null )
tempVar = String.valueOf(var2.getName());
else // to give the user information, which part of reference is ill.
tempVar = "NULL.name";
LOGGER.debug( "some additional vars initialized; var1 ="
+ var1 + "/ var2.name = " + tempVar);
}
}
}
You can see, that the code with pencil-logging-statements is more readable than in the old-school way of logging. Pencil also provides a NullPointerException-precaution mechanism. It also does not allow to call business-logic-methods from within your logging-expressions. The result is, your code is safer than before. No more NullPointerExceptions and no more unintended business logic in the logging expressions.
Pencil simply forbids a faulty logging-functionality in your code.
Where can i download "Pencil"?
If you are interesting in pencil, you can DOWNLOAD THE ACTUAL DISTRIBUTION here.If you have questions about pencli, please read the FAQ and the How-to within the "Documents & files"-area or send me an email.
The instalation is described here.
have fun, Andreas Siebert.
| Powered by CollabNet | Feedback |
FAQ |
Press |
Developer tools
© 1995 - 2007 CollabNet. CollabNet is a registered trademark of CollabNet, Inc. |

