Introduction
Salt or SaltStack is an IT (Information Technology) infrastructure management tool. It can be used for managing hundreds of computers or servers. Using Salt or SaltStack, you can perform some hardware or software jobs on hundreds of computers remotely by using a Master Computer. You can perform the task for many computers simultaneously.
Salt works on the Master-Slave model. You can send commands from the master to the slave and perform system configuration on the slave systems. The Slaves are called Minions in Salt.
Logging is used to track the running software events. An event is described by a descriptive message, which can optionally contain variable data.

In this article, we will discuss the ways of logging the data in Salt.
Logging Events in Salt
Salt provides many functionalities to keep track of the events happening in the computer system while the Salt Minion is performing a job. Logging the events is important as it helps in identifying the problems and errors.
You can log different events like errors, warnings, garbage values or critical errors.
Salt uses Python’s logging library. A sequence of priority is given to each type of log event. Setting the log level to a specific level will log all the statements at that level or higher levels.
There are the following log levels in Salt -
| Level | Numeric Value | Description |
| quite | 1000 | Nothing should be logged. |
| critical | 50 | Only critical errors will be logged. |
| error | 40 | All the errors will be logged. |
| warning | 30 | All the warnings are logged. |
| info | 20 | It consists of normal log information. |
| profile | 15 | Profiling information on Salt performance. |
| debug | 10 | It consists of the information that can be used for debugging. |
| trace | 5 | It contains detailed debugging information. |
| garbage | 1 | It contains, even more, debugging information. |
| all | 0 | All kinds of events will be logged. |




