Using NLog as OWIN logger

BTW. there’s some news about that topic: My NLog OWIN adapter went “official”

While playing around with OWIN, WebAPI 2 and the other new kids I was missing a logger factory for my favorite logging framework: NLog! And I wouldn’t be a good software engineer if I didn’t wire this up in a nice tiny library.

There you go: Pysco68.Owin.Logging.NLogAdapter on GitHub

And to make it a breeze I built a Nuget package for this one! That means that you can now use NLog as logger for your next OWIN project just by doing this:

Voila! If you’d like to customize the log-level translation table just take a look at the Github page!

Note: this is not a logging middleware! If you want some of those Google is your friend. The log factory (it’s an implementation of Microsoft.Owin.Logging.ILoggerFactory in fact) does provide an implementation of ILogger that wraps arround NLog.There’s some pretty good information about the architecture at Tugber Kugurlu’s blog / introduction to OWIN Logging.

I really hope you enjoy this one! Leave a comment if you have any question or suggestions! Contributions are welcome, just fork and create a pull request, I’ll review it for sure!

Dual CS 606 record player – Restoration (part 2)

Dual 606 motor driver pcb

Hello again! Christmas’ approaching with giant steps and I finally have some free time to write again. After sitting on my desk for a short while, here are the remaining steps for the restoration of the Dual CS 606 record player. For those of you who haven’t read the first part: Dual 606 record player – Restoration (part 1).

In this second part we will focus on getting the electronics up and running again. This involves replacing all the capacitors and checking/cleaning the pots, switches and finally checking solder joins.

Continue reading

Another Norwegian sweater – Fair Isle Knitting

blue bonnet

Finally I finished my last Christmas present! Another Norwegian sweater in blue and off-white for Yannic. There is no problem blogging it before Christmas, because he sat the most time right next to me while I was knitting. Plus he chose the pattern for the sweater and from time to time he had to try it on. With the yarn left over I made a matching bonnet. It will also be a Christmas present but not for him.

Continue reading

ASP.NET Identity 2.0 and MariaDB

…I finally made it: ASP.NET Identity 2.0 running with MariaDB! It was more difficult than I expected it to be. I’ve been using EntityFramework with MySQL successfully in my day-time job for over two years now. As I was starting a small toy project at home last week I decided to go the easy route: ASP.NET Web API 2 running in an OWIN application. That was the perfect opportunity for giving ASP.NET Identity 2.0 a shot – instead of rolling my own authentication framework.

I still believe that this choice isn’t bad at all, but I underestimated the cost of getting it to run in a heterogeneous environment (read: not everything is Microsoft technology).

Surprisingly (to me – but hey!) Microsoft is providing an example of how to use MySQL and EntityFramework 6 as a storage provider for ASP.NET Identity 2.0. Sadly the example isn’t working out of the box – at least not in my setup. One aspect is that when they wrote the tutorial the MySQL Connector/NET wasn’t supporting EF Code-first migrations as well as it does nowadays. The second issue was the primary keys in the ASP.NET Identity tables being too long for MySQL.

Continue reading

Homemade Sourdough Bread

Black Beer Bread

After buying a bread-baking book for naturally leavened bread back in March I finally began baking our own bread. Naturally leavened means that the bread only needs little yeast. The bread rises by the use of a sourdough.So past week I started making the sourdough setup. Mixing flour and water, waiting patiently for the next day to come, adding another bunch of flour and water…

Finally after three days of mixing and waiting my first rye sourdough experiment was successful. At this point I decided to make the Black-Beer-Bread from my baking book. First I prepared the sourdough and the Poolish. After another day waiting I could mix the main dough, let it rise  and start baking at last!!! Voila, it was worth waiting so long. I was rewarded with a wonderful fluffy, good smelling (and tasting) bread with a crunchy crust. Yummy! Continue reading

Short loin steaks with bacon beans and potatoes casserole

Short loin steak with salt and pepper

A new age of culinary excess has begun… for us at least! Here’s how the story started: on Friday we got a brand new gas grill. More precisely we (I) bought a Weber Q3200.

And even if it is too early for a full review, here’s how we inaugurated THE grill: two beef short loin steaks (mine weighting 400 grams and a 300 grams one for Katharina) with bacon wrapped green beans, potatoes casserole and Katharina’s most delicious herb butter.

Continue reading

Dual 606 record player – Restoration (part 1)

If you read the very first article on this blog you might have seen that I’m rebuilding old record players. And lately I just started over with my third one; it’s a 1980 Dual 606. Back then it was a mid-range player, but much of the hardware was taken unchanged from the high-end equipment, most notably the drive-train (more on that later).

On a first sight the device was in a very good condition when I received it, but there were some issues with the electronics – rather common for devices this old – which had to be fixed. The first part of this series of articles is about technical details and how to break the turntable open. Continue reading

Norwegian sweater – knitting project plus add-on

Norwegian sweater pattern

I just wanted to show you my latest knitting project. A Norwegian sweater knitted with Fair Isle technique.

It was the first time I used this technique and in retrospect it sounds more complicated than it really is. I was surprised that I finished this sweater that fast (It took me only 4 weeks).

I always purchase one extra ball of each color just to be on the safe side, so had some wool left over and knitted a matching bonnet (the add-on) with the same pattern.

You can get the instructions for free from DROPS Design (drops design model no. 122-2), where you can find the patterns for the matching bonnet, gloves and collar too. You can directly purchase the needed wool on site at Lanade. I ordered exactly the wool and color used in the model, red, grey, and white.

 

So I am ready for winter but let’s hope the summer stays a while longer.

My sewing and knitting experience

I can’t really say when I started sewing but I think I was about 6 years old when I made my first sewing item with the old sewing machine of my mom. I made little pouches to put lavender in.

Around this time my mom was rediscovering the joy of sewing. In the following years she was teaching me how to sew. Later I wanted to sew my own garments. I can’t remember it exactly but I think I started with a skirt. Just two side seams, an elastic around the waist, and I was done.

Continue reading