# The EVMS log file and error data collection

This chapter discusses the EVMS information and error log file and the various logging levels. It also explains how to change the logging level.

## About the EVMS log file

The EVMS Engine creates a log file called `/var/log/evmsEngine.log` every time the Engine is opened. The Engine also saves copies of up to 10 previous Engine sessions in the files `/var/log/evmsEngine.n.log`, where `n` is the number of the session between 1 and 10.

## Log file logging levels

There are several possible logging levels that you can choose to be collected in `/var/log/evmsEngine.log`. The "lowest" logging level, `critical`, collects only messages about serious system problems, whereas the "highest" level, `everything`, collects all logging related messages. When you specify a particular logging level, the Engine collects messages for that level and all the levels below it.

The following table lists the allowable log levels and the information they provide:

### EVMS logging levels

Level name | Description
--- | ---
Critical | The health of the system or the Engine is in jeopardy; for example, an operation has failed because there is not enough memory.
Serious | An operation did not succeed.
Error | The user has caused an error. The error messages are provided to help the user correct the problem.
Warning | An error has occurred that the system might or might not be able to work around.
Default | An error has occurred that the system has already worked around.
Details | Detailed information about the system.
Entry_Exit | Traces the entries and exits of functions.
Debug | Information that helps the user debug a problem.
Extra | More information that helps the user debug a problem than the "Debug" level provides.
Everything | Verbose output.

## Specifying the logging levels

By default, when any of the EVMS interfaces is opened, the Engine logs the `Default` level of messages into the `/var/log/evmsEngine.log` file. However, if your system is having problems and you want to see more of what is happening, you can change the logging level to be higher; if you want fewer logging messages, you can change the logging level to be lower. To change the logging level, specify the `-d` parameter and the log level on the interface open call. The following examples show how to open the various interfaces with the highest logging level (`everything`):

    GUI:		evmsgui -d everything

    Ncurses:	evmsn -d everything

    CLI:		evms -d everything

### NOTE

If you use the EVMS mailing list for help with a problem, providing to us the log file that is created when you open one of the interfaces (as shown in the previous commands) makes it easier for us to help you.

The EVMS GUI lets you change the logging level during an Engine session. To do so, follow these steps:

1. Select Settings Log Level Engine.

2. Click the Level you want.

The CLI command, `probe`, opens and closes the Engine, which causes a new log to start. The log that existed before the `probe` command was issued is renamed `/var/log/evmsEngine.1.log` and the new log is named `/var/log/evmsEngine.log`.

If you will be frequently using a different log level than the default, you can specify the default logging level in `/etc/evms.conf` rather than having to use the `-d` option when starting the user interface. The "debug_level" option in the "engine" section sets the default logging level for when the Engine is opened. Using the `-d` option during the command invocation overrides the setting in `/etc/evms.conf`.