# Logging

## Overview

Prism operates under the philosophy that logs should contain useful, diagnostic information about the project without overwhelming the reader.&#x20;

Prism uses and extends Python’s builtin [`logging`](https://docs.python.org/3/library/logging.html#module-logging) module to perform system logging. Whenever you run a project, Prism automatically logs events for parsing the configuration files, compiling the tasks and creating the DAG, and executing the tasks, etc.  These events are color-coded to enhance readability. No configuration is needed to enable Prism logging.

## Customizing logs

The [`PRISM_LOGGER`](https://docs.runprism.com/v0.2.7/fundamentals/config-files/prism_project.py/prism_logger) logger is the entry point into Prism's logging system. If you want to log custom events in your project, you can do so with this variable:

```python
# tasks/task_with_logging.py

import prism_project
from prism_project import PRISM_LOGGER
import prism.task

class TaskWithLogging(prism.task.PrismTask):
    
    def run(self, tasks, hooks):
        PRISM_LOGGER.info("This is an example log message!")
        return ...
```

Logs are automatically saved to `logs.log` in the base project folder.

Note that you can specify the default log level to show using the command-line interface. See the [CLI section](https://docs.runprism.com/v0.2.7/cli) for more information.
