5

I have a scenario where I have WSS 3.0 only on a server and I would like to be able to log to the ULS log. In most cases, I have MOSS 2007 installed on the same server and can use the class/method Microsoft.Office.Server.Diagnostics.PortalLog.LogString but that is not an option in this case.

Have anyone else been able to successfully log to the ULS log on a WSS-only server? If not, do you use a logging component instead like log4net etc or how do you log? Logging to the ULS log would be strongly preferred.

TIA, Magnus

Magnus Lassi
  • 921
  • 2
  • 9
  • 21

2 Answers2

3

Microsoft has documented it with this example on MSDN

Lars Fastrup
  • 5,458
  • 4
  • 31
  • 35
1

I use log4net with the ULS LogAppender fromCodeplex: http://splog4net.codeplex.com/

The details on that are here: Link

And the log4net is here: http://logging.apache.org/log4net/index.html

I find this to be the best solution simply because where and how I log is something that changes from client to client and log4net allows me to re-configure this really easily.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109