At first, this question is not the same as an question problem-with-logging, not the same becase that question/bug is an bug with FileLog (as is mentioned by Alex Yakunin).

Version: DataObjects.Net v4.3.5 (build 5872) for .NET 4.0

When i run unit test on my model, it throws me exception - Object reference not set to an instance of an object., stack trace:

   at Xtensive.Storage.Building.Builders.TypeBuilder.BuildType(TypeDef typeDef)
   at Xtensive.Storage.Building.Builders.ModelBuilder.BuildTypes(IEnumerable`1 typeDefs)
   at Xtensive.Storage.Building.Builders.ModelBuilder.BuildModel()
   at Xtensive.Storage.Building.Builders.ModelBuilder.Run()
   at Xtensive.Storage.Building.Builders.DomainBuilder.BuildModel()
   at Xtensive.Storage.Building.Builders.DomainBuilder.BuildDomain(DomainConfiguration configuration, DomainBuilderConfiguration builderConfiguration)
   at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.BuildStageDomain(UpgradeStage stage)
   at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.Build(DomainConfiguration configuration)
   at Xtensive.Storage.Domain.Build(DomainConfiguration configuration)
   at Model.Test.AutoBuildTest.BuildDomain(DomainConfiguration configuration) in c:\XYZ\AutoBuildTest.cs:line 39

I want to know what is wrong and thus trying to configure xtensive logging (as described in manual) but with no success. I am trying everything, finally my app.config looks like this:

    <section name="Xtensive.Storage" type="Xtensive.Storage.Configuration.Elements.ConfigurationSection, Xtensive.Storage" />
    <section name="Xtensive.Core.Diagnostics" type="Xtensive.Core.Diagnostics.Configuration.ConfigurationSection, Xtensive.Core" />

      <!-- Use these settings for Xtensive.Storage.* logs -->
      <log name="Core" events="Debug,Info,Warning,Error,FatalError" provider="Console" />
      <log name="Modelling" events="Debug,Info,Warning,Error,FatalError" provider="Console"/>
      <log name="Storage.Building" events="Debug,Info,Warning,Error,FatalError" provider="Console"/>
      <log name="Storage" events="Debug,Info,Warning,Error,FatalError" provider="Console" />
      <log name="Storage.Providers.Sql" events="Debug,Info,Warning,Error,FatalError" provider="Console" />

Also trying to change provider="Console" to provider="Debug" to see detailed report in debug window whats going on, but there are no debug writes from xtensive. Whats i must to configure to have debug writes?

asked Sep 13 '10 at 11:24

Peter%20%C5%A0ulek's gravatar image

Peter Šulek

edited Sep 13 '10 at 15:10

After more investigation, this is not a bug of DO4. I just run unit tests from Resharper Unit Test Sessions Browser which handles and redirect console output into its own windows, which i dont see it at first. Then when provider="Console" everything is logged into console output (e.g. wiht R# test runner into its own window). Sorry for false alarm, i'm closing bug this.

(Sep 13 '10 at 15:10) Peter Šulek Peter%20%C5%A0ulek's gravatar image

Good then ;)

(Sep 13 '10 at 15:23) Alex Yakunin Alex%20Yakunin's gravatar image

One Answer:

Issue 811 is created.

answered Sep 13 '10 at 14:39

Alex%20Yakunin's gravatar image

Alex Yakunin

And closed.

(Sep 13 '10 at 15:23) Alex Yakunin Alex%20Yakunin's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA