Why Log4net does not log in PowerGUI?

I use log4net as logger and here is my appender:

<appender name="ConsoleAppender"
<threshold value="INFO"/>
<layout type="log4net.Layout.PatternLayout">
  <conversionPattern value="%message%newline" />

In my case I write a powershell commandlet and logs into the powershell, but not if I use the powergui. Should I use an other appender? Someone could help me mange that it logs in the power gui?


Most likely, log4net is looking in the current working directory for the configuration file, but your working directory is different when you're in PowerGui vs. in the console.

Use set-location at the beginning of your script to change to the appropriate directory.

Need Your Help

Obtaining ssl certificate on windows using C++

c++ windows ssl openssl ssl-certificate

I am trying to obtain a remote server's ssl certificate on windows. One option I have found is to use openssl. The command to do that as indicated by some posts on the internet is: