Webmasters, gagnez de l'argent en affichant des bannières contextuelles Oxado
SourceForge.net Logo
Support This Project
   LeCouteauSuisse Project
Welcome ! [ Home ]  ·  [ Downloads ]  ·  [ Forums ]  ·  [ News ]  ·  [ Documentations ]  
[ Home ]

[ Documentations ]

FileLogger


This logger send information into a file.

See Service Configuration for detailled information to configure your service. You must declare this logger with the <logger> section inside the <loggers> section. It will looks like :

<logger name="MyLoggerName" type="LeCouteauSuisse.Components.FileLogger, 
		LeCouteauSuisseComponents, Version=1.0.0.2, Culture=neutral, PublicKeyToken=8d1037c5df6d5bd0">
This component have some parameters inside the section <settings>. Each parameter is written with a <setting> section.

Key nameMandatoryDefault valueDescription
filenameFormatNoValue from the Path.GetTempFileName() method of the Framework.The name of the file. You can format the filename with the current date and time. Example : "c:\Temp\FileLogger{0:yyyyMMdd}.txt" will generate a log file each day
lineFormatNo{0:dd/MM/yyyy HH:mm:ss} [{1}] : [Level={2}] [MessageId={3:d}] [Category={4:d}] : {5}\nThe format of a message to write.
lineFormatExceptionNo{0:dd/MM/yyyy HH:mm:ss} [{1}] : [Level={2}] [MessageId={3:d}] [Category={4:d}] : {5}\nError : {6}\nThe format of a message with an error to write.
filterLevelNoAllFilter message to log by level. List of value from the LoggerLevel enumeration separated by a comma.

Format of a line

Six or Seven parameters are available when you format a line. These parameters are :

  • Current date and time
  • Thread identifier
  • Level of message
  • The message identifier
  • The message category
  • The message
  • The error description when message has errors


LeCouteauSuisse