The log4net configuration is not enough ? 2009/7/7 Jan Limpens <[email protected]>
> Ah, cool, thought that this meant lots of updates, or worse delete and > inserts, whenever I loaded a collection. > > I have to find out how to have a nh only log on my castle ILogger > controlled site, because other Infos do interest me :) > > Thanks, Fabio! > > --J > > > > 2009/7/7 Fabio Maulo <[email protected]> > >> Mean only that you have the INFO log of NH activated.Log levels >> OFF <= normal used in production >> ERROR or WARN <= should be used >> DEBUG <= in general is used by NH developers >> INFO <= used by those want become crazy watching the NH's log >> >> 2009/7/7 Jan Limpens <[email protected]> >> >> Hello! >>> >>> I recently found out that my logs are FULL of these: >>> .... >>> 2009-07-07 17:49:43,929 [4] INFO NHibernate.Engine.Cascade - cascade >>> NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for collection: >>> Businesslayer.Theme.Articles >>> 2009-07-07 17:49:43,929 [4] INFO NHibernate.Engine.Cascade - done >>> cascade NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for >>> collection: Businesslayer.Theme.Articles >>> 2009-07-07 17:49:43,929 [4] INFO NHibernate.Engine.Cascade - done >>> processing cascade >>> NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for: >>> Businesslayer.Theme >>> 2009-07-07 17:49:43,930 [4] INFO NHibernate.Engine.Cascade - processing >>> cascade NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for: >>> Businesslayer.Marketing.BannerPosition >>> 2009-07-07 17:49:43,930 [4] INFO NHibernate.Engine.Cascade - cascade >>> NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for collection: >>> Businesslayer.Marketing.BannerPosition.Banners >>> 2009-07-07 17:49:43,930 [4] INFO NHibernate.Engine.Cascade - done >>> cascade NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for >>> collection: Businesslayer.Marketing.BannerPosition.Banners >>> 2009-07-07 17:49:43,930 [4] INFO NHibernate.Engine.Cascade - done >>> processing cascade >>> NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for: >>> Businesslayer.Marketing.BannerPosition >>> 2009-07-07 17:49:43,930 [4] INFO NHibernate.Engine.Cascade - processing >>> cascade NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for: >>> Businesslayer.Marketing.BannerPosition >>> 2009-07-07 17:49:43,930 [4] INFO NHibernate.Engine.Cascade - cascade >>> NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for collection: >>> Businesslayer.Marketing.BannerPosition.Banners >>> 2009-07-07 17:49:43,930 [4] INFO NHibernate.Engine.Cascade - done >>> cascade NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for >>> collection: Businesslayer.Marketing.BannerPosition.Banners >>> 2009-07-07 17:49:43,930 [4] INFO NHibernate.Engine.Cascade - done >>> processing cascade >>> NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for: >>> Businesslayer.Marketing.BannerPosition >>> .... >>> >>> a) what does this actually mean? >>> >>> b) I am fighting a certain sluggishness especially in relation with >>> transactions. Could this be the cause? What could I do to improve the >>> situation? >>> >>> Just for illustration the BannerPosition class: >>> >>> public class BannerPosition : NamedEntityBase<Guid> >>> { >>> private readonly ISet<Banner> banners = new HashedSet<Banner>(); >>> private readonly Random r = new Random(); >>> >>> protected BannerPosition() >>> { >>> } >>> >>> public BannerPosition(string name) >>> : base(name) >>> { >>> } >>> >>> public virtual ReadOnlyCollection<Banner> Banners >>> { >>> get { return >>> SetManager<Banner>.GetSetAsSortedReadOnlyCollection(banners); } >>> } >>> >>> public virtual uint Hits >>> { >>> get { return (uint) banners.Sum(b => b.Hits); } >>> } >>> >>> public virtual void AddBanner(string imageSource, string url, >>> string text) >>> { >>> SetManager<Banner>.Add(new Banner(imageSource, url, text), >>> banners); >>> } >>> >>> public virtual void RemoveBanner(Guid id) >>> { >>> var banner = banners.Where(b => b.Id == >>> id).SingleOrDefault(); >>> if (banner != null) >>> SetManager<Banner>.Remove(banner, banners); >>> } >>> >>> public virtual Banner GetRandom() >>> { >>> var bs = banners >>> .Where(b => b.IsActive) >>> .ToList(); >>> if (bs.Count == 0) >>> return null; >>> if (bs.Count == 1) >>> return bs[0]; >>> var idx = r.Next(0, bs.Count); >>> return bs[idx]; >>> } >>> } >>> >>> and it's mapping (generated by nhf) >>> >>> <class name="Businesslayer.Marketing.BannerPosition, Businesslayer, >>> Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" >>> table="`BannerPosition`" xmlns="urn:nhibernate-mapping-2.2"> >>> <id name="Id" type="Guid" column="BannerPositionID"> >>> <generator class="guid.comb" /> >>> </id> >>> <property name="Name" type="String"> >>> <column name="Name" length="32" /> >>> </property> >>> <property name="Key" type="String" >>> index="INDEX_BannerPosition_BusinessKey"> >>> <column name="BusinessKey" length="32" not-null="true" >>> unique="true" /> >>> </property> >>> <set name="Banners" access="field.camelcase" cascade="all"> >>> <key foreign-key="FK_BannerPosition_Banner" >>> column="BannerPositionID" /> >>> <one-to-many class="Businesslayer.Marketing.Banner, Businesslayer, >>> Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /> >>> </set> >>> </class> >>> >>> -- >>> Jan >>> >>> >>> >> >> >> -- >> Fabio Maulo >> >> >> > > > -- > Jan > > > > -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
