How do I disable all logging on my packages?

How do I disable all logging on my packages?

Rate This
  • Comments 2

A quick post today – I received this question from a customer earlier today, and it took me a little while to figure it out.

We have a number of packages that use a SQL Server logger. We want to turn logging off, but don’t want to modify all of our packages. Is there an easy way to disable logging for individual packages?

Why yes, yes there is.

Packages have a LoggingMode property which controls their logging behavior. The setting has three values:

UI Value Numeric Value
UseParentSetting 0
Enabled 1
Disabled 2

Usually this value is set through the logging UI -

image

It can also be set through configurations, or by using /SET on the command line. Setting LoggingMode to 2 will disable all logging done by log providers in your package.

dtexec /f "C:\Package.dtsx" /set "\Package.Properties[LoggingMode];2"

Note, logging messages will still be displayed on the console – you can control these with the /REPORTING switch.

Leave a Comment
  • Please add 8 and 6 and type the answer here:
  • Post
  • If the components have individualized eventfilters for their logging settings, even if all sub components LoggingMode = UseParentSetting (0), changing the LoggingMode at the package level will not work.  Instead, each individual component's LoggingMode will have to be changed. Syntax similar to the below will work. The below example is overriding the LoggingMode property of the "ExecutableName" SSIS subcomponent and turning off logging.

    /set "\Package\ExecutableName.Properties[LoggingMode];2"

    If you are unsure of the exact syntax to use, open the package in visual studio, and go through the motions in the Package Configurations GUI to add a package configuration for the property you want to set. The GUI will tell you the specific property path after you select it, so you can use the property path it generates in a command line call to dtsexec.

    http://msdn.microsoft.com/en-us/library/ms141132.aspx

  • Another possible option, especially if you need to control logging after "going live" with your SSIS, is to create a config file and mark/check off the LoggingMode in it, in the package properties, then you can toggle it on or off on demand.

Page 1 of 1 (2 items)