Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jay 425 posts 652 karma points
    Jul 21, 2016 @ 07:29
    Jay
    0

    Umbraco 7.4.3 umbracoSettngs <logging>

    Hi All,

    I'm planning to disable to logging on publish of nodes as i've got a scheduler that update nodes and it's filling up the umbracolog tables.

    I thought of excluding this only on the specific nodes but can't find anything.

    I'm on umbraco 7.4.3 and i've found the below settings within umbracosettings.config which i've tried but it's still saving the publish logs into the table. Any idea?

    Thanks

    <logging>
        <enableLogging>true</enableLogging>
        <enableAsyncLogging>true</enableAsyncLogging>
        <disabledLogTypes>
          <logTypeAlias>publish</logTypeAlias>
        </disabledLogTypes>
        <!-- You can add your own logging tool by implementing the umbraco.BusinessLogic.Interfaces.ILog interface and add the reference here -->
        <!-- The external logger can also act as the audit trail storage by setting the logAuditTrail attribute to true -->
        <!--<externalLogger assembly="~/bin/assemblyFileName.dll" type="fully.qualified.namespace.and.type" logAuditTrail="false" /> -->
      </logging>
    
  • David Peck 690 posts 1896 karma points c-trib
    Jul 21, 2016 @ 09:51
    David Peck
    100

    Just edit log4net.config to set level messages are logged at to WARN (and above).

    <log4net>
    
      <root>
        <priority value="WARN"/>
        <appender-ref ref="AsynchronousLog4NetAppender" />
      </root>
      ...
    </log4net>
    

    However it is worth noting that your bigger issue is probably all the different versions for each updated item of content that you're going to be accumulating. Your DB may get very big and slow, if that is a large number of items. Without knowing anything about your app, I suggest you possibly should be using a custom database for this, rather than Umbraco content?! However the quick fix would be to install unversion.

  • Jay 425 posts 652 karma points
    Jul 21, 2016 @ 10:04
    Jay
    0

    Thanks David,

    I'll try out the WARN option to see it works. The package of unversion sounds awesome too. I'll try to play around with it as well.

    Do you know if unversion allows you to specify the Doc Type to be excluded from logging?

    Thanks

  • David Peck 690 posts 1896 karma points c-trib
    Jul 21, 2016 @ 10:07
    David Peck
    0

    No worries. If it solves the query can you mark it as the solution please?

    Yes UnVersion can be specific to a doc type(s)

  • Jay 425 posts 652 karma points
    Jul 21, 2016 @ 11:02
    Jay
    0

    Hey David,

    When i've got my settings set to WARN and publish the specific node that i need to filter, it doesn't save the INFO logs within App_Data > Logs folder which is great.

    I've tested the unversion package as well. By setting the specific node that i want to have it filter out in unversion.config

    But when i publish that node type the umbracoLogs table are still saving the publish log.

    Does it works on yours? I'm on Umbraco 7.4.3

    Thanks

  • Jay 425 posts 652 karma points
    Jul 21, 2016 @ 11:18
    Jay
    0

    Oh yeah i have the following in my unversion.config

     <?xml version="1.0"?>
        <unVersionConfig>
          <add docTypeAlias="BlogPost" rootXpath="//node[@nodeTypeAlias='BlogPost']" maxDays="0" maxCount="10" />
        </unVersionConfig>
    
  • David Peck 690 posts 1896 karma points c-trib
    Jul 21, 2016 @ 11:45
    David Peck
    0

    Do you need the Xpath attribute?

  • David Peck 690 posts 1896 karma points c-trib
    Jul 21, 2016 @ 11:49
    David Peck
    0

    Also, I don't know as it will prevent the log entry. The log entries aren't the main issue. It is the property data that results in a row per property per version for each content item changed. That really racks up quickly.

    You can periodically truncate umbracoLog if it is beginning to get large but less than 100,000 records I wouldn't be concerned with.

    You're 'rollback' list should be short. Your audit may be uneffected.

  • Jay 425 posts 652 karma points
    Jul 21, 2016 @ 11:47
    Jay
    0

    dont' really know. i'll remove that bits and retest it again. I've set the maxDays to '0'

  • Jay 425 posts 652 karma points
    Jul 21, 2016 @ 12:02
    Jay
    0

    yup there's only a single item in my version now :)

    david, do you manually truncate your umbracoLog in your sql or do you normally use a tool for it?

    Thanks

  • David Peck 690 posts 1896 karma points c-trib
    Jul 22, 2016 @ 08:48
    David Peck
    0

    I'm normally not worried about it, but if I were then I might create a scheduled task (Windows scheduled task if possible otherwise an umbraco one) that using SQL gets rid of all entries older than X days.

  • Jay 425 posts 652 karma points
    Jul 21, 2016 @ 15:10
    Jay
    0

    sorted :)

  • David Peck 690 posts 1896 karma points c-trib
    Jul 22, 2016 @ 08:48
    David Peck
    0

    Great. Pleased to hear it.

Please Sign in or register to post replies

Write your reply to:

Draft