I know logging is the Hello, world! sample of aspect-oriented programming. It is the sample on the home page of www.postsharp.org, and many have blogged about that. However, all solutions I've seen so far use PostSharp Laos...

The problem with Laos is its impact on performance. Although it performs similarly or better than other AOP solutions, it cannot be compared to inlined code. And that's what Log4PostSharp does: it inlines logging instructions into your method body. Parameters are not boxed, no "eventArgs" object is created, no external aspect class is involved. Just pure instructions.

I almost forgot the most important: Log4PostSharp uses log4net as the backend.

Among the sweets you'll find: a quite powerful system to set up the logging string like {signature} or {@parameter_name}. All evaluated at build time (unless parameter values of course)!

The project is available under BSD license. A great work of Michal Dabrowski!

Next month I'm back in Poland, this time in Warsaw. I'll be present at the Zine Day 2008. Once again, I will be in excellent company with András Belokosztolszki, principal architect of RedGate.

I have two sessions. The first will introduce aspect-oriented programming in general and will compare four frameworks: PostSharp (of course), Spring.NET, Castle, and Microsoft PIAB. This is a tough session, but I have a good time slot (9h-10h15). The second session will be very interactive. Together with Jakub Binkowski, I will demonstrate simple and advanced features of PostSharp Laos on a real application.