error opening log file
1. Preheat oven to 400F with racks in upper and lower thirds. Generously butter baking dish.
2. Arrange bread in 1 layer in 2 large shallow baking pans and toast, switching positions of pans halfway through baking, until golden and dry about 15 minutes. Transfer to a large bowl.
3. Meanwhile, cook shallots in 1 stick margarine in a 12-inch heavy skillet over medium heat, stirring occasionally, until softened and golden, about 6 minutes. Add mushrooms, celery, thyme, sage, and 12 teaspoon salt and cook, stirring occasionally, until liquid given off by mushrooms has evaporated and mushrooms are browned, 20 to 30 minutes.
4. Add wine and deglaze skillet by boiling, stirring and scraping up any brown bits, until wine is reduced by about half, about 2 minutes. Transfer to bread in bowl. Add hazelnuts and parsley and toss.
5. Whisk together stock, eggs, 1 teaspoon salt, and 1/2 teaspoonm pepper, then stir into bread mixture. Transfer to baking dish and dot top of stuffing with remaining 1/2 stick margarine.