Orchard log did not work in my own module?

Topics: Core, Customizing Orchard, General
Jan 31, 2012 at 9:45 AM

Hello!

I want to use Orchard log in my own module.I'm trying:

Logger.Log(LogLevel.Error, e, e.Message);

After this log file created in folder .../Orchard.Web\App_Data\Logs.But it's empty.How can I do it correctly?Thanks!

Feb 2, 2012 at 12:04 PM

In Orhcard.Users module used above code and it's working.But in my own module it is doesn't work.What I will be do?Please, help me!Thanks!

Feb 2, 2012 at 12:07 PM

Can you show the whole class where you're doing this? Must be something you haven't shown, e.g. the way you're injecting the logger.

May 7, 2012 at 12:00 PM
randompete wrote:

Can you show the whole class where you're doing this? Must be something you haven't shown, e.g. the way you're injecting the logger.

Class Nullogger.But in Orchard.Users module used class CastleLogger.How to injecting the logger?Thanks!