Permalink
Browse files

add

  • Loading branch information...
0 parents commit 861e2972b0dd7c534e9404fcc2d0e07fcbb2cd7d @jkowalski committed Aug 11, 2004
Showing with 5,755 additions and 0 deletions.
  1. +32 −0 LICENSE.txt
  2. +157 −0 NLog.FxCop
  3. +162 −0 NLog.build
  4. +56 −0 NLog.sln
  5. +1 −0 NLog.version
  6. +132 −0 doc/index.html
  7. +121 −0 doc/prettyprint.js
  8. +82 −0 doc/style.css
  9. +55 −0 src/NLog.ASPNet/Appenders/ASPNetTraceAppender.cs
  10. +45 −0 src/NLog.ASPNet/AssemblyInfo.cs
  11. +40 −0 src/NLog.ASPNet/AssemblySign.cs
  12. +61 −0 src/NLog.ASPNet/LayoutAppenders/ASPNetRawUrlLayoutAppender.cs
  13. +65 −0 src/NLog.ASPNet/LayoutAppenders/ASPNetSessionValueLayoutAppender.cs
  14. +120 −0 src/NLog.ASPNet/NLog.ASPNet.csproj
  15. +45 −0 src/NLog.ComInterop/AssemblyInfo.cs
  16. +40 −0 src/NLog.ComInterop/AssemblySign.cs
  17. +54 −0 src/NLog.ComInterop/ILogger.cs
  18. +128 −0 src/NLog.ComInterop/Logger.cs
  19. +110 −0 src/NLog.ComInterop/NLog.ComInterop.csproj
  20. +19 −0 src/NLog.Test/App.config
  21. +94 −0 src/NLog.Test/NLog.Test.csproj
  22. +72 −0 src/NLog.Test/Test.cs
  23. +107 −0 src/NLog.Win32/LayoutAppenders/Registry.cs
  24. +95 −0 src/NLog.Win32/NLog.Win32.csproj
  25. BIN src/NLog.snk
  26. +92 −0 src/NLog/Appender.cs
  27. +44 −0 src/NLog/Appenders/ConsoleAppender.cs
  28. +161 −0 src/NLog/Appenders/FileAppender.cs
  29. +54 −0 src/NLog/Appenders/MemoryAppender.cs
  30. +59 −0 src/NLog/Appenders/NullAppender.cs
  31. +51 −0 src/NLog/Appenders/TraceAppender.cs
  32. +56 −0 src/NLog/AssemblyInfo.cs
  33. +40 −0 src/NLog/AssemblySign.cs
  34. +195 −0 src/NLog/Config/AppenderRule.cs
  35. +53 −0 src/NLog/Config/ConfigSectionHandler.cs
  36. +77 −0 src/NLog/Config/LoggingConfiguration.cs
  37. +270 −0 src/NLog/Config/XmlLoggingConfiguration.cs
  38. +130 −0 src/NLog/Layout.cs
  39. +87 −0 src/NLog/LayoutAppender.cs
  40. +52 −0 src/NLog/LayoutAppenderAttribute.cs
  41. +150 −0 src/NLog/LayoutAppenderFactory.cs
  42. +79 −0 src/NLog/LayoutAppenders/BaseDir.cs
  43. +112 −0 src/NLog/LayoutAppenders/CallSite.cs
  44. +68 −0 src/NLog/LayoutAppenders/Date.cs
  45. +67 −0 src/NLog/LayoutAppenders/Environment.cs
  46. +125 −0 src/NLog/LayoutAppenders/Identity.cs
  47. +122 −0 src/NLog/LayoutAppenders/Level.cs
  48. +57 −0 src/NLog/LayoutAppenders/Literal.cs
  49. +53 −0 src/NLog/LayoutAppenders/LoggerName.cs
  50. +53 −0 src/NLog/LayoutAppenders/LongDate.cs
  51. +57 −0 src/NLog/LayoutAppenders/MachineName.cs
  52. +52 −0 src/NLog/LayoutAppenders/Message.cs
  53. +90 −0 src/NLog/LayoutAppenders/NLogDir.cs
  54. +71 −0 src/NLog/LayoutAppenders/ProcessTime.cs
  55. +53 −0 src/NLog/LayoutAppenders/ShortDate.cs
  56. +54 −0 src/NLog/LayoutAppenders/ThreadName.cs
  57. +52 −0 src/NLog/LayoutAppenders/Ticks.cs
  58. +101 −0 src/NLog/LogEventInfo.cs
  59. +45 −0 src/NLog/LogLevel.cs
  60. +141 −0 src/NLog/LogManager.cs
  61. +137 −0 src/NLog/Logger.cs
  62. +140 −0 src/NLog/LoggerImpl.cs
  63. +270 −0 src/NLog/NLog.csproj
  64. +48 −0 src/NLog/NullLogger.cs
  65. +23 −0 src/NLog/PropertyHelper.cs
  66. +122 −0 tools/ReplaceVersion.cs
  67. BIN tools/ReplaceVersion.exe
  68. +11 −0 webtest/default.aspx
  69. +61 −0 webtest/global.asax
  70. +27 −0 webtest/web.config
@@ -0,0 +1,32 @@
+
+Copyright (c) 2004 Jaroslaw Kowalski <jaak@polbox.com>
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+* Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the Jaroslaw Kowalski nor the names of its
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FxCopProject Version="1.3" Name="NLog">
+ <ProjectOptions>
+ <SharedProject>False</SharedProject>
+ <Stylesheet Apply="False">c:\program files\microsoft fxcop 1.30\Xml\FxCopReport.Xsl</Stylesheet>
+ <SaveMessages>
+ <Project Status="Active, Excluded" NewOnly="False" />
+ <Report Status="Active" NewOnly="False" />
+ </SaveMessages>
+ <ProjectFile Compress="True" DefaultTargetCheck="True" DefaultRuleCheck="True" SaveByRuleGroup="" Deterministic="False" />
+ <PermitAnalysis>True</PermitAnalysis>
+ <SourceLookup>True</SourceLookup>
+ <AnalysisExceptionsThreshold>100</AnalysisExceptionsThreshold>
+ <RuleExceptionsThreshold>10</RuleExceptionsThreshold>
+ <Spelling Locale="en-us" />
+ </ProjectOptions>
+ <Targets>
+ <AssemblyReferenceDirectories>
+ <Directory>D:\Work\NLog\src\NLog.Test\bin\Debug\</Directory>
+ </AssemblyReferenceDirectories>
+ <Target Name="D:\Work\NLog\src\NLog\bin\Debug\NLog.dll" Analyze="True" AnalyzeAllChildren="True" />
+ </Targets>
+ <Rules>
+ <RuleFiles>
+ <RuleFile Name="$(FxCopDir)\Rules\PerformanceRules.dll" Enabled="True" AllRulesEnabled="True" />
+ <RuleFile Name="$(FxCopDir)\Rules\ComRules.dll" Enabled="True" AllRulesEnabled="True" />
+ <RuleFile Name="$(FxCopDir)\Rules\UsageRules.dll" Enabled="True" AllRulesEnabled="True" />
+ <RuleFile Name="$(FxCopDir)\Rules\SecurityRules.dll" Enabled="True" AllRulesEnabled="True" />
+ <RuleFile Name="$(FxCopDir)\Rules\DesignRules.dll" Enabled="True" AllRulesEnabled="True" />
+ <RuleFile Name="$(FxCopDir)\Rules\GlobalizationRules.dll" Enabled="True" AllRulesEnabled="True" />
+ <RuleFile Name="$(FxCopDir)\Rules\NamingRules.dll" Enabled="True" AllRulesEnabled="True" />
+ </RuleFiles>
+ <Groups />
+ <Settings />
+ </Rules>
+ <FxCopReport Version="1.3" LastAnalysis="2004-08-08 19:35:40Z">
+ <Targets>
+ <Target Name="D:\Work\NLog\src\NLog\bin\Debug\NLog.dll">
+ <Modules>
+ <Module Name="nlog.dll">
+ <Namespaces>
+ <Namespace Name="NLog.LayoutAppenders">
+ <Classes>
+ <Class Name="LevelLayoutAppender">
+ <Constructors>
+ <Constructor Name=".cctor()">
+ <Messages>
+ <Message Status="Excluded" Created="2004-08-08 14:08:05Z">
+ <Rule TypeName="DoNotDeclareExplicitStaticConstructors" />
+ <Issues>
+ <Issue Certainty="90" Level="CriticalWarning">
+ <SourceCode Path="D:\Work\NLog\src\NLog\LayoutAppenders" File="Level.cs" Line="16" />
+ <Resolution>
+ <Data>
+ <Items>
+ <Item>LevelLayoutAppender</Item>
+ </Items>
+ </Data>
+ </Resolution>
+ </Issue>
+ </Issues>
+ </Message>
+ </Messages>
+ </Constructor>
+ </Constructors>
+ </Class>
+ </Classes>
+ </Namespace>
+ <Namespace Name="NLog">
+ <Classes>
+ <Class Name="LayoutAppenderFactory">
+ <Constructors>
+ <Constructor Name=".cctor()">
+ <Messages>
+ <Message Status="Excluded" Created="2004-08-08 14:08:05Z">
+ <Rule TypeName="DoNotDeclareExplicitStaticConstructors" />
+ <Issues>
+ <Issue Certainty="90" Level="CriticalWarning">
+ <SourceCode Path="d:\work\nlog\src\nlog" File="layoutappenderfactory.cs" Line="12" />
+ <Resolution>
+ <Data>
+ <Items>
+ <Item>LayoutAppenderFactory</Item>
+ </Items>
+ </Data>
+ </Resolution>
+ </Issue>
+ </Issues>
+ </Message>
+ </Messages>
+ </Constructor>
+ </Constructors>
+ </Class>
+ </Classes>
+ <ValueTypes>
+ <ValueType Name="LogEventInfo">
+ <Messages>
+ <Message Status="Excluded" Created="2004-08-08 14:08:05Z">
+ <Rule TypeName="ConsiderOverridingEqualsAndOperatorEqualsOnValueTypes" />
+ <Issues>
+ <Issue Certainty="75" Level="Warning">
+ <Resolution>
+ <Data>
+ <Id>Equals</Id>
+ <Items>
+ <Item>LogEventInfo</Item>
+ </Items>
+ </Data>
+ </Resolution>
+ </Issue>
+ <Issue Certainty="75" Level="Warning">
+ <Resolution>
+ <Data>
+ <Id>op_equality</Id>
+ <Items>
+ <Item>LogEventInfo</Item>
+ </Items>
+ </Data>
+ </Resolution>
+ </Issue>
+ </Issues>
+ </Message>
+ </Messages>
+ </ValueType>
+ </ValueTypes>
+ </Namespace>
+ </Namespaces>
+ </Module>
+ </Modules>
+ </Target>
+ </Targets>
+ <Rules>
+ <Rule TypeName="ConsiderOverridingEqualsAndOperatorEqualsOnValueTypes">
+ <Name>Consider overriding Equals and the equality operator on value types</Name>
+ <Description>The default System.ValueType implementation might not perform as well as a custom implementation.</Description>
+ <LongDescription />
+ <GroupOwner>MS FxCopDev</GroupOwner>
+ <DevOwner />
+ <Url>http://www.gotdotnet.com/team/fxcop/docs/rules/Performance/EqualsAndOperatorEqualsOnValueTypes.html</Url>
+ <Email>askfxcop@microsoft.com</Email>
+ <MessageLevel Certainty="75">Warning</MessageLevel>
+ <File Name="PerformanceRules.dll" Version="1.30.0.0" />
+ </Rule>
+ <Rule TypeName="DoNotDeclareExplicitStaticConstructors">
+ <Name>Do not declare explicit static constructors</Name>
+ <Description>Static fields should be initialized when declared.</Description>
+ <LongDescription>Initializing static data in explicit static constructors results in less performant code.</LongDescription>
+ <GroupOwner>MS FxCopDev</GroupOwner>
+ <DevOwner />
+ <Url>http://www.gotdotnet.com/team/fxcop/docs/rules/Performance/DoNotDeclareExplicitStaticConstructors.html</Url>
+ <Email>askfxcop@microsoft.com</Email>
+ <MessageLevel Certainty="90">CriticalWarning</MessageLevel>
+ <File Name="PerformanceRules.dll" Version="1.30.0.0" />
+ </Rule>
+ </Rules>
+ </FxCopReport>
+</FxCopProject>
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project default="build">
+ <property name="nlog.debug" value="true" />
+ <property name="nlog.define" value="NANT" />
+
+ <target name="configure">
+ <call target="configure-${framework::get-target-framework()}" />
+ <property name="output.dir" value="${nant.project.basedir}/bin/${framework::get-target-framework()}${if(nlog.debug,'-debug','')}" unless="${property::exists('output.dir')}" />
+ <mkdir dir="${output.dir}" />
+ </target>
+
+ <target name="build" depends="configure">
+ <call target="build-${framework::get-target-framework()}" />
+ </target>
+
+ <target name="debug">
+ <property name="nlog.debug" value="true" />
+ </target>
+
+ <target name="release">
+ <property name="nlog.debug" value="false" />
+ </target>
+
+ <target name="package" depends="build">
+ <mkdir dir="${nant.project.basedir}/dist" />
+ <property name="zip.file" value="${nant.project.basedir}/dist/NLog-${framework::get-target-framework()}${if(nlog.debug,'-debug','')}.zip" />
+ <zip zipfile="${zip.file}">
+ <fileset basedir="${output.dir}">
+ <include name="*.dll" />
+ <include name="*.pdb" />
+ </fileset>
+ </zip>
+ </target>
+
+ <target name="clean" depends="configure">
+ <delete>
+ <fileset basedir="${output.dir}">
+ <include name="*.dll" />
+ <include name="*.pdb" />
+ <include name="*.xml" />
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="NLog" depends="configure">
+ <csc target="library" output="${output.dir}/NLog.dll" define="${nlog.define}" debug="${nlog.debug}">
+ <sources basedir="src/NLog">
+ <include name="**/*.cs" />
+ </sources>
+ <references>
+ <include name="mscorlib.dll" />
+ <include name="System.dll" />
+ <include name="System.Xml.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="NLog.ComInterop" depends="NLog">
+ <csc target="library" output="${output.dir}/NLog.ComInterop.dll" define="${nlog.define}" debug="${nlog.debug}">
+ <sources basedir="src/NLog.ComInterop">
+ <include name="**/*.cs" />
+ </sources>
+ <references>
+ <include name="${output.dir}/NLog.dll" />
+ <include name="mscorlib.dll" />
+ <include name="System.dll" />
+ <include name="System.Xml.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="NLog.ASPNet" depends="NLog">
+ <csc target="library" output="${output.dir}/NLog.ASPNet.dll" define="${nlog.define}" debug="${nlog.debug}">
+ <sources basedir="src/NLog.ASPNet">
+ <include name="**/*.cs" />
+ <include name="mscorlib.dll" />
+ <include name="System.dll" />
+ <include name="System.Xml.dll" />
+ </sources>
+ <references>
+ <include name="${output.dir}/NLog.dll" />
+ <include name="mscorlib.dll" />
+ <include name="System.dll" />
+ <include name="System.Xml.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="NLog.Win32" depends="NLog">
+ <csc target="library" output="${output.dir}/NLog.Win32.dll" define="${nlog.define}" debug="${nlog.debug}">
+ <sources basedir="src/NLog.Win32">
+ <include name="**/*.cs" />
+ </sources>
+ <references>
+ <include name="${output.dir}/NLog.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="NLog.Test" depends="NLog">
+ <csc target="exe" output="${output.dir}/NLog.Test.exe" define="${nlog.define}" debug="${nlog.debug}">
+ <sources basedir="src/NLog.Test">
+ <include name="**/*.cs" />
+ </sources>
+ <references>
+ <include name="${output.dir}/NLog.dll" />
+ </references>
+ </csc>
+ <copy file="src/NLog.Test/App.config" tofile="${output.dir}/NLog.Test.exe.config" />
+ </target>
+
+ <target name="register-com" depends="configure">
+ <exec program="${path::combine(framework::get-framework-directory(framework::get-target-framework()),'regasm.exe')}"
+ commandline="/tlb ${output.dir}/NLog.ComInterop.dll" />
+ </target>
+
+ <target name="register-com-with-codebase" depends="configure">
+ <exec program="${path::combine(framework::get-framework-directory(framework::get-target-framework()),'regasm.exe')}"
+ commandline="/tlb /codebase ${output.dir}/NLog.ComInterop.dll" />
+ </target>
+
+ <target name="test" depends="NLog.Test">
+ <exec program="${output.dir}/NLog.Test.exe" />
+ </target>
+
+ <target name="webtest" depends="build">
+ <copy todir="webtest/bin">
+ <fileset basedir="${output.dir}">
+ <include name="*.dll" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="configure-net-1.0">
+ </target>
+
+ <target name="configure-net-1.1">
+ </target>
+
+ <target name="configure-netcf-1.0">
+ <property name="nlog.define" value="${nlog.define};NETCF;NETCF_1_0" />
+ </target>
+
+ <target name="build-net-1.0" depends="NLog, NLog.ASPNet, NLog.Win32, NLog.ComInterop" />
+ <target name="build-net-1.1" depends="NLog, NLog.ASPNet, NLog.Win32, NLog.ComInterop" />
+ <target name="build-netcf-1.0" depends="NLog, NLog.ComInterop" />
+
+ <target name="dist">
+ <exec program="nant.exe" commandline="-k:net-1.0 release package" if="${framework::exists('net-1.0')}" />
+ <exec program="nant.exe" commandline="-k:net-1.0 debug package" if="${framework::exists('net-1.0')}" />
+ <exec program="nant.exe" commandline="-k:net-1.1 release package" if="${framework::exists('net-1.1')}" />
+ <exec program="nant.exe" commandline="-k:net-1.1 debug package" if="${framework::exists('net-1.1')}" />
+ <exec program="nant.exe" commandline="-k:netcf-1.0 release package" if="${framework::exists('netcf-1.0')}" />
+ <exec program="nant.exe" commandline="-k:netcf-1.0 debug package" if="${framework::exists('netcf-1.0')}" />
+ </target>
+
+ <target name="updateversion">
+ <foreach item="Line" in="Nlog.version" delim=";" property="nlog.version">
+ <exec workingdir="${nant.project.basedir}" program="tools/ReplaceVersion.exe" commandline=". ${nlog.version}" />
+ </foreach>
+ </target>
+</project>
Oops, something went wrong.

0 comments on commit 861e297

Please sign in to comment.