Permalink
Browse files

Added diagnostic logging

Logging enabled for fluent mapping discovery, convention discovery, and initial automapping behaviour (scanning, exclusions, and candidates).

To use, modify your Fluent.Configuration code:

    Fluently.Configure()
      ...
      .Diagnostics(dia =>
      {
        dia.Enable();
	dia.OutputToConsole();
      })
      .BuildSessionFactory();
  • Loading branch information...
1 parent cfe8c1f commit 8c7ad8d3887d7c5146a8982e06e9062986bf15e4 @jagregory committed Sep 22, 2010
Showing with 1,725 additions and 30 deletions.
  1. +1 −1 src/FluentNHibernate.5.0.ReSharper
  2. +11 −0 src/FluentNHibernate.Specs/Automapping/Fixtures/StubTypeSource.cs
  3. +400 −0 src/FluentNHibernate.Specs/Diagnostics/Registration_diagnostics_specs.cs
  4. +1 −0 src/FluentNHibernate.Specs/FluentNHibernate.Specs.csproj
  5. +5 −1 src/FluentNHibernate.Testing/Cfg/MappingConfigurationTests.cs
  6. +94 −0 src/FluentNHibernate.Testing/Diagnostics/DefaultOutputFormatterTests.cs
  7. +67 −0 src/FluentNHibernate.Testing/Diagnostics/DiagnosticConfigurationTests.cs
  8. +195 −0 src/FluentNHibernate.Testing/Diagnostics/DiagnosticLoggerTests.cs
  9. +35 −0 src/FluentNHibernate.Testing/Diagnostics/DiagnosticMessageDespatcherTests.cs
  10. +40 −0 src/FluentNHibernate.Testing/Diagnostics/StringLambdaOutputListenerTests.cs
  11. +11 −0 src/FluentNHibernate.Testing/EmptySource.cs
  12. +5 −0 src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj
  13. +11 −0 src/FluentNHibernate.Testing/StubTypeSource.cs
  14. +11 −0 src/FluentNHibernate/AssemblyTypeSource.cs
  15. +4 −3 src/FluentNHibernate/Automapping/AutoMap.cs
  16. +23 −2 src/FluentNHibernate/Automapping/AutoPersistenceModel.cs
  17. +2 −1 src/FluentNHibernate/Automapping/DefaultAutomappingConfiguration.cs
  18. +24 −4 src/FluentNHibernate/Cfg/FluentConfiguration.cs
  19. +11 −1 src/FluentNHibernate/Cfg/MappingConfiguration.cs
  20. +17 −0 src/FluentNHibernate/Cfg/SetupConventionFinder.cs
  21. +18 −5 src/FluentNHibernate/CombinedAssemblyTypeSource.cs
  22. +22 −12 src/FluentNHibernate/Conventions/DefaultConventionFinder.cs
  23. +9 −0 src/FluentNHibernate/Conventions/IConventionFinder.cs
  24. +9 −0 src/FluentNHibernate/Diagnostics/AutomappingType.cs
  25. +56 −0 src/FluentNHibernate/Diagnostics/ConsoleOutputListener.cs
  26. +93 −0 src/FluentNHibernate/Diagnostics/DefaultDiagnosticLogger.cs
  27. +21 −0 src/FluentNHibernate/Diagnostics/DefaultDiagnosticMessageDespatcher.cs
  28. +211 −0 src/FluentNHibernate/Diagnostics/DefaultOutputFormatter.cs
  29. +27 −0 src/FluentNHibernate/Diagnostics/DiagnosticResults.cs
  30. +102 −0 src/FluentNHibernate/Diagnostics/DiagnosticsConfiguration.cs
  31. +7 −0 src/FluentNHibernate/Diagnostics/IDiagnosticListener.cs
  32. +17 −0 src/FluentNHibernate/Diagnostics/IDiagnosticLogger.cs
  33. +8 −0 src/FluentNHibernate/Diagnostics/IDiagnosticMessageDespatcher.cs
  34. +7 −0 src/FluentNHibernate/Diagnostics/IDiagnosticResultsFormatter.cs
  35. +32 −0 src/FluentNHibernate/Diagnostics/NullDiagnosticsLogger.cs
  36. +8 −0 src/FluentNHibernate/Diagnostics/ScanPhase.cs
  37. +8 −0 src/FluentNHibernate/Diagnostics/ScannedSource.cs
  38. +33 −0 src/FluentNHibernate/Diagnostics/SkippedAutomappingType.cs
  39. +27 −0 src/FluentNHibernate/Diagnostics/StringLambdaOutputListener.cs
  40. +16 −0 src/FluentNHibernate/FluentNHibernate.csproj
  41. +3 −0 src/FluentNHibernate/ITypeSource.cs
  42. +23 −0 src/FluentNHibernate/PersistenceModel.cs
@@ -219,7 +219,7 @@
<PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
- <UserRule Inspect="True" Prefix="" Suffix="" Style="aa_bb" StaticnessKind="Static, Instance" AccessRight="Private, Protected, ProtectedInternal, Internal, Public" Description="MSpec naming">
+ <UserRule Inspect="False" Prefix="" Suffix="" Style="aa_bb" StaticnessKind="Static, Instance" AccessRight="Private, Protected, ProtectedInternal, Internal, Public" Description="MSpec naming">
<ElementKinds>
<Kind Name="Machine.Specifications_Behavior" />
<Kind Name="Machine.Specifications_Context" />
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using FluentNHibernate.Diagnostics;
namespace FluentNHibernate.Specs.Automapping.Fixtures
{
@@ -16,5 +17,15 @@ public IEnumerable<Type> GetTypes()
{
return types;
}
+
+ public void LogSource(IDiagnosticLogger logger)
+ {
+ logger.LoadedFluentMappingsFromSource(this);
+ }
+
+ public string GetIdentifier()
+ {
+ return "StubTypeSource";
+ }
}
}
Oops, something went wrong.

0 comments on commit 8c7ad8d

Please sign in to comment.