# Configure logging

Snow Inventory writes log files that are found in the log files location. The maximum number of log files is five. The Snow Inventory configuration file can be configured to modify default logging.

The <Logging> parameter must be added to the Snow Inventory configuration file together with preferred tags. If a tag is added, logging will be recorded for that tag.

The following code will enable logging for all tags:

<Logging>
<Tags>
<Tag>*</Tag>
</Tags>
</Logging>


For troubleshooting purposes, it is advised to only include tags you would like to see logging for.

To see all available tags, follow these steps when you are signed in to the Windows server that hosts Snow Inventory:

1. Start Command Prompt

2. Enter snowserver.exe lt

3. Press Enter

The following code is an example of logging that is enabled for the request-pipe, ssl, and local-storage tags.

<Logging>
<Tags>
<Tag>request-pipe</Tag>
<Tag>ssl</Tag>
<Tag>local-storage</Tag>
</Tags>
<MaxLogSize>100</MaxLogSize>
</Logging>

<MaxLogSize> can be used to modify the default log-file size. The value for this parameter represents the number of megabytes (MB) that the file can grow to. By default, a log-file can grow to a maximum of two MB in size. The maximum log-file size is 500 MB.

To disable logging for all tags, modify the configuration file as follows:

<Logging>
<Tags></Tags>
</Logging>


The following code is an example of logging that is enabled for the LogLevel tag. LogLevel determines what logs based on their severity should be visible on the log-file.

<Logging>
<LogLevel>info</LogLevel>
</Logging>

In the above example, the use of LogLevel ensures that no logs marked as debug or trace information are visible in the output. So, according to the table below, the messages visible in the log-file include info, warning, and error respectively.

The severity of LogLevels and their visible outputs on the log-files are listed below:

Severity

LogLevel

Output visible

all

trace, debug, info, warning, error

1

trace

trace, debug, info, warning, error

2

debug

debug, info, warning, error

3

info

info, warning, error

4

warning

warning, error

5

error

error