Skip to content

GenericLibsBase Configuration

Jon Smith edited this page Jan 8, 2015 · 3 revisions

Configuration of GenericLibsBase

GenericLibsBase configuration class, GenericLibsBaseConfig only contains one item, and that is the logger setup. NOTE: This is not used by GenericServices so you can ignore it.

Logging items: default is no logging.

  • Property Func<string, IGenericLogger> SetLoggerMethod Providing a method of the required signiture will allow logging to be accessed via GetLogger(name) method (see next). Typically you would set the logger something like this: GenericLibsBaseConfig.SetLoggerMethod = name => new Log4NetGenericLogger(name);
  • IGenericLogger GetLogger( string name) This with create a logger with the name as given by the string.

NOTE: Look in the Unit Tests for Log4NetGenericLogger and TraceGenericLogger implementations