============
Project logs
============

Because Data Science & AI Workbench is built on top of a Kubernetes cluster, each project session is created as a pod. Each project session pod has an ``editor``, ``sync``, and ``proxy`` container, and logs for each container are accessible to aid you in troubleshooting issues you may encounter with your project. These logs can provide insights to the operational health of your project, possible configuration errors, and potential security issues. 

Viewing project logs
====================

To view a project session's logs:

#. Log in to Workbench.
#. Open a project. 
#. If necessary, start a session in the project. 
#. Select |newspaper| **Logs** from the left-hand navigation. 
#. Open a container dropdown to view the logs for that container. 

.. thumbnail:: ../../images/project_session_logs.png
   :align: center

.. tip::

    Use |magnifying-glass| search to help you efficiently locate information in the container logs. 

Editor container logs
---------------------

The editor container is where the integrated development environment (IDE) set by the project configurations runs. Logs from this container can provide insights into the following: 

* User actions performed within the editor, such as file edits, saves, and execution of code cells
* Errors or warnings related to the editor software, as opposed to Workbench software
* Problems that are caused by editor plug-ins or extensions

Sync container logs
-------------------

The sync container is responsible for synchronizing project files and code between persistent storage and the editor. Logs from this container can provide insights into the following:

* Successes or failures when syncing files between the local user repository and the projects remote repository
* Issues encountered during file creation or deletion, or file modification attempts
* Problems accessing external resources the project relies on

Proxy container logs
--------------------

The proxy container handles network traffic to and from the project's environment, and facilitates access to web interfaces and APIs. Logs from this container can provide insights into the following:

* Incoming and outgoing network requests, which is useful for identifying unauthorized access attempts
* Errors related to network connectivity, DNS issues, or failed attempts to connect to external services
* Information on request handling times and bottlenecks in network communication

.. |newspaper| raw:: html

   <svg class="inline" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M152 48c-22.1 0-40 17.9-40 40V424c0 15.7-6.4 29.8-16.8 40H440c30.9 0 56-25.1 56-56V88c0-22.1-17.9-40-40-40H152zM56 480c-30.9 0-56-25.1-56-56V192c0-35.3 28.7-64 64-64v16c-26.5 0-48 21.5-48 48V424c0 22.1 17.9 40 40 40s40-17.9 40-40V88c0-30.9 25.1-56 56-56H456c30.9 0 56 25.1 56 56V408c0 39.8-32.2 72-72 72H56zM352 104c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8s-3.6 8-8 8H360c-4.4 0-8-3.6-8-8zm0 64c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8s-3.6 8-8 8H360c-4.4 0-8-3.6-8-8zm0 64c0-4.4 3.6-8 8-8h80c4.4 0 8 3.6 8 8s-3.6 8-8 8H360c-4.4 0-8-3.6-8-8zM160 296c0-4.4 3.6-8 8-8H440c4.4 0 8 3.6 8 8s-3.6 8-8 8H168c-4.4 0-8-3.6-8-8zm0 64c0-4.4 3.6-8 8-8H440c4.4 0 8 3.6 8 8s-3.6 8-8 8H168c-4.4 0-8-3.6-8-8zm24-248c-4.4 0-8 3.6-8 8v96c0 4.4 3.6 8 8 8H296c4.4 0 8-3.6 8-8V120c0-4.4-3.6-8-8-8H184zm-24 8c0-13.3 10.7-24 24-24H296c13.3 0 24 10.7 24 24v96c0 13.3-10.7 24-24 24H184c-13.3 0-24-10.7-24-24V120z"/></svg>

.. |magnifying-glass| raw:: html
    
    <svg class="inline" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M368 208A160 160 0 1 0 48 208a160 160 0 1 0 320 0zM337.1 371.1C301.7 399.2 256.8 416 208 416C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208c0 48.8-16.8 93.7-44.9 129.1L505 471c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L337.1 371.1z"/></svg>