Go to previous topic
Go to next topic
Last Post 12/13/2009 3:10 PM by  Joanne Crang
Event log Entries
 2 Replies
AddThis - Bookmarking and Sharing Button
Author Messages
Joanne Crang
Helpdesk leader
Helpdesk leader
Posts:40
Points:78


--
11/30/2009 3:29 PM

    Can I stop Email Manager logging so many events?  I seem to get so many and then struggle to do a Delete All because it times out etc! 

    Just deleted what I believe to be a weeks worth - 51,152 entries!!!  We have some clean up scripts from your support team but am wondering if I have to log so much to begin with as don't really want to have to run the scripts all the time!

    Joanne

    Rod Weir
    HelpMaster development team
    Helpdesk Hall of Fame
    Helpdesk Hall of Fame
    Posts:555
    Points:1017


    --
    12/1/2009 7:55 PM

    Hi Joanne,

    Thanks for posting this.  Future versions of HelpMaster will have a screen to configure the logging options for each of the services.  Until then, you can use a database trigger to prevent the record being logged.

    Execute the following SQL against your database.  This will create a trigger on the tblEmailManagerEventLog table that will bypass all logging except for error logs.

    If you would ever like the logging back, you'll need to delete the trigger, or modify it accordingly.

    Please note that the Email Manager logs are also recorded in the Windows Event viewer, so even if you use this database trigger approach to block the database level logging, you've always got them there at the Windows level.  Windows logging allows you to control many aspects of the log file.

    Hope this helps,

    Best regards,

    Rod

     

    -- Database trigger to disable Email Manager event logging except for errors.

    -- SQL Server 2005/2008, HelpMaster v9.1 only

    CREATE TRIGGER dbo.tblEmailManagerEventLog_InsertTrigger_OnlyLogErrors
       ON  dbo.tblEmailManagerEventLog
       INSTEAD OF INSERT
    AS
    BEGIN
        SET NOCOUNT ON;

        -- Insert statements for trigger here
        If (Select LogType From Inserted) > 0 -- All information log information, Errors have a value of 0
        Begin
            Print 'Event not logged'
        End
    END

    HelpMaster development team
    Check out the HelpMaster roadmap
    Joanne Crang
    Helpdesk leader
    Helpdesk leader
    Posts:40
    Points:78


    --
    12/13/2009 3:10 PM
    Excellent thanks. We are upgrading our main database tomorrow morning to version 9 so once we've got that under control we'll look at adding the above trigger. The event logging is great when you first start out and want to monitor what's happening. Once everything is ticking along the need to see it declines!

    Thanks Rod
    Joanne


    ---