> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# $lightningLog

[localhost link]: http://localhost:3000/docs/5/app-studio/reference/services/lightning.$lightningLog

[mintlify link]: https://doc.lucidworks.com/docs/5/app-studio/reference/services/lightning.$lightningLog

[old doc.lw link]: https://doc.lucidworks.com/app-studio/4.2/1216.md

> [card] Key questions to get you started
>
> Powered by Lucidworks Agent Studio

## Description

Twigkit factory for logging.

## Methods

### debug(file, message)

Method to debug

#### Parameters

| Param | Type | Details |
| - | - | - |
| file | string | The file the message is coming from |
| message | string | The message to be displayed |

#### Example

```js wrap  theme={"dark"}
$lightningLog.debug(instance,message);
```

### error(file, message)

Method to return error message

#### Parameters

| Param | Type | Details |
| - | - | - |
| file | string | The file the message is coming from |
| message | string | The message to be displayed |

#### Example

```js wrap  theme={"dark"}
$lightningLog.error(instance,message);
```

### warn(file, message)

Method to return warn message

#### Parameters

| Param | Type | Details |
| - | - | - |
| file | string | The file the message is coming from |
| message | string | The message to be displayed |

#### Example

```js wrap  theme={"dark"}
$lightningLog.warn(instance,message);
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.