# Checking Logs

Cosmocloud offers the **Logs** feature to user for easy debugging and development process. User can navigate to `Logs` tab present in `Application layer`  to check logs.

## Exploring Log table&#x20;

Let us see what values are displayed in `Log table` in cosmocloud.

<figure><img src="https://392607133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZCdm9aJ8vkvDIIbg04AL%2Fuploads%2FqhDoapKwITXdSO0a1adz%2Fimage.png?alt=media&#x26;token=d7412cc7-730c-4838-aba9-d3636c254a85" alt=""><figcaption></figcaption></figure>

1. **Timestamp** : It displays API call request time
2. **Request Id :** It is unique ID assigned to each API request call. Multiple Logs having same request ID means that all of those logs are received for same API call.
3. **Log Type** : It specify what type of information log holds for a specific API call. In image provided above both logs are for same API calls. One holds `REQUEST` information log e.g. endpoint,headers, request body etc. whereas one holds `RESPONSE` information  e.g. response data etc.
4. **Log Level** : It specify the logs level for e.g. `DEBUG`, `INFO` , `ERROR` etc.
5. **Endpoint** : It specify the endpoint for API from which logs are received.
6. **Method** : It specify the API call method type

## Environment specific Logging

You can access API logs for specific environments using toggle present at top of `Log table`

<figure><img src="https://392607133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZCdm9aJ8vkvDIIbg04AL%2Fuploads%2FqScoRbtSBDdVqyv1kDM3%2Fimage.png?alt=media&#x26;token=f112cac1-a0f0-4b2d-a0bf-77ffbb36f349" alt=""><figcaption></figcaption></figure>

Just select the environment you want to see the `Logs` for and you are good to go.

## Using Debug node&#x20;

To utilise the `Logs feature` to the fullest we have provided `Debug node` which helps you to print values in the logs.

<figure><img src="https://392607133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZCdm9aJ8vkvDIIbg04AL%2Fuploads%2FobbCgE5kOexI7XLTfNRf%2Fimage.png?alt=media&#x26;token=3459a25e-acb5-4cdd-8f41-a8e357be2cfa" alt=""><figcaption></figcaption></figure>

We can use this node to print values to the `Logs`. Let us assume we have a variable of type dict declared at top of our API  flow and i want to check if values in it are correct. We can use debug node for same.

<figure><img src="https://392607133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZCdm9aJ8vkvDIIbg04AL%2Fuploads%2FNG8fQuVVxQlCHRAoWZx8%2Fimage.png?alt=media&#x26;token=39c712bd-f2ad-4a23-9319-5b95093efd95" alt=""><figcaption></figcaption></figure>

When you make an API call for same flow you will receive logs as specified below<br>

<figure><img src="https://392607133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZCdm9aJ8vkvDIIbg04AL%2Fuploads%2FxytNLH6DcAkGL8Yz3DpH%2Fimage.png?alt=media&#x26;token=d05eb65f-58d2-407c-b405-f9fd6eb3c95d" alt=""><figcaption></figcaption></figure>

Now as you can see, Apart from `REQUEST` and `REQUEST` you are now also receiving `DEBUG` log for same API call as well. when you click on **View** you will be able to see debug values.

<figure><img src="https://392607133-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZCdm9aJ8vkvDIIbg04AL%2Fuploads%2FiZIGXcFDeOqD4fXpHmvm%2Fimage.png?alt=media&#x26;token=1d75644c-a1cd-416c-9f90-79f5ddaacaf8" alt=""><figcaption></figcaption></figure>
