Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.
/ WCFAppender-log4net Public archive

This package is a WCF Appender for log4net. The interface has two modes, client rendering and server rendering. This is to allow you the option to postpone the rendering of the event data if you want to be able to change rendering configuration without redeploying your clients.

Notifications You must be signed in to change notification settings

edwinf/WCFAppender-log4net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Log4Net WCF Appender

  1. Overview A log4net appender that pushes log entries to a WCF service.

  2. Sample Config:

<log4net>
	<appender name="WCFAppender" type="WCFAppender_log4net.WCFAppender, WCFAppender-log4net">
			<BindingType>HTTP</BindingType>
			<RenderOnClient>True</RenderOnClient>
			<URL>http://localhost:43573/WCFLogger.svc</URL>
			<layout type="log4net.Layout.PatternLayout" value="%date [%thread] %-5level %logger - %message%newline" />
	</appender>
	<root>
		<level value="ALL" />
		<appender-ref ref=""WCFAppender"" />
	</root>
</log4net>
  1. The WCF Appender is based on the buffering appender. The default buffer is 512 messages before they are sent in bulk to the service.
    If you want real time transmission to the service, set the bufferSize to 0 as part of the appender definition. <bufferSize value="0" />

The WCF appender has two modes: render on client and render on service. The render on client takes the log event data and renders the log string on the client and sends it to the WCF service as a string. This is the most interoperable as there is no object serialization taking place. The render on server is a little more complex, but offers the benifit of controlling the rendering in a central place, and can be changed without redeploying your client. The event is serialized to the server using .Net specific seralization, to avoid unknown type errors. The type DLLs much match on the client and on the server for server side rendering to work. The implementations of both functions log to log4net on the server side for ease of configurability; however, this implementation is left open for you to change however you'd like.

  1. License: This appender is licensed under the apache 2 license. Which basically means: a) use it / modify it however you want as long as you leave the copyright notice in the source. b) If you're just using the DLLs, you don't need to worry about anything.

    Copyright 2012 edwinf (https://github.com/edwinf)

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0
    

    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

This package is a WCF Appender for log4net. The interface has two modes, client rendering and server rendering. This is to allow you the option to postpone the rendering of the event data if you want to be able to change rendering configuration without redeploying your clients.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages