Project Description
PLogger is a light, fast file appender and database logger build using a parallel pipeline architecture. It is much easier and faster to set up and use then Log4Net or the enterprise library

To use this logger you need to do is either add the class to your code or use the DLL as a reference. If you chose to use the dll you need to import it in your code as follows:

using InvertedSoftware.PLogger;
Then to write a log line you simply need to call:

Plogger.Log("My Message");

Default configuration: please the following configuration section to your web.config or app.config

<section name="PloggerConfiguration" type="InvertedSoftware.PLogger.PloggerConfiguration, InvertedSoftware.PLogger, Version=, Culture=neutral, PublicKeyToken=null" allowLocation="true" allowDefinition="Everywhere" allowExeDefinition="MachineToApplication" overrideModeDefault="Allow" restartOnExternalChanges="true" requirePermission="true" />
PLogFileMessageTemplate="this is a test {0}"
MessageParameterName="@ErrorName" />

Parameters description:
PLogType: Can be file or database
PLogEnabled: Enables logging
BaseNameFile: The absolute or relative log file path.
PLogFileMaxSizeKB: The rolling file size.
PLogFileMessageTemplate: The string formatted message to use.
PLogLevel: Log only messages that have been marked this level and above.
StringConnectionName: The string connection to use when logging to a database.
StoredProcedureName: The stored procedure to invoke when logging to a database.
MessageParameterName: The Sql Parameter to use when invoking StoredProcedureName.

If you choose to add a message template you can call it in the following format:

Plogger.Log(string.Empty, true, 2, null, new string[] { "Replacement Value" });

You can also log exceptions

Plogger.Log(string.Empty, true, 2, new Exception("My Exception"), new string[] { "Replacement Value" });

Last edited Aug 13, 2013 at 5:09 PM by InvertedSoftware, version 6