Add a "Log" method that takes a LogEvent class/structure. Similar to Log4Net's ILogger.Log(LoggingEvent loggingEvent) or NLog's Log.Log(LogEventInfo logEvent). One use for this method would be as a way to implement logging for log messages that originated elsewhere. For example, define a Common.Logging.LogInfo structure and make it serializable. A logging client (like one implemented in Silverlight) could create and populate the LogInfo structure and then send it to a webservice or WCF service that implements logging in terms of Common.Logging. The message can now be logged, but it will have had all of its "intrinsic" properties (time of message, logger name, machine name, etc) set by the originator of the message, not by the context of the current logger actually being used to write the message.
An example of a LogInfo structure that can convey a lot of information about the context of original message:
[Serializable]
Class LogInfo
{
DateTime time;
string loggerName ;
LogLevel level;
string message;
string machineName;
string appDomainName;
int processId;
string processName;
int managedThreadId;
string managedThreadName;
string userName;
int eventId;
Exception ex; //Might not be serializable from Silverlight
string exString;
}
Information that does not correspond directly the LoggingEvent or LogEventInfo classes could be stuffed into the logger's context dictionary before logging.
Maybe a separate interface (from ILog) to keep the "messier" structure/class interaction out of the way of more common usage.
You are probably aware of Clog (clog.codeplex.com - now part of calcium.codeplex.com). It does something similar about sending a logging structure across a communication channel to be logged by a WCF service that is implemented on top of a logging abstraction.
Note that this is probably not that hard to implement from outside of Common.Logging. I imagine that I could just copy the logging abstractions that I want to support (log4net, NLog, for example) - or maybe subclass the existing implemetations - and add another interface "ILogDirect" (or something). ILogDirect would have a single method (or it could have more), Log(LogInfo info). The implementation of Log would simply, assuming the log level check passes, take the properties from the LogInfo structure/class and create the corresponding LoggingEvent or LogEventInfo class as described above, and log it using the underlying logger.