> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pba-ctools/pentaho-cdf-api/cdf/logger.md).

# Logger

## cdf. Logger

Static

This is a static class used for logging messages in the console.

**AMD Module**

`require(["cdf/Logger"], function(Logger) { /* code goes here */ });`

\*\*Source:\*\*Logger.js, line 16

## Members

| Name                | Description            |
| ------------------- | ---------------------- |
| loglevel : `string` | The current log level. |

## Methods

| Name              | Description                          |
| ----------------- | ------------------------------------ |
| debug(m)          | Logs a message at `debug` level.     |
| error(m)          | Logs a message at `error` level.     |
| exception(m)      | Logs a message at `exception` level. |
| info(m)           | Logs a message at `info` level.      |
| log(m, type, css) | Logs a message to the console.       |
| warn(m)           | Logs a message at `warn` level.      |

## Members Details

| loglevel: `string`                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------ |
| <p>The current log level.</p><p>\*\*Source:\*\*Logger.js, line 44</p><p><strong>Default Value:</strong>"debug"</p> |

\## Methods Details

| **debug**(m)                                                                               |               |                 |
| ------------------------------------------------------------------------------------------ | ------------- | --------------- |
| <p>Logs a message at <code>debug</code> level.</p><p>\*\*Source:\*\*Logger.js, line 87</p> |               |                 |
| Name                                                                                       | Default Value | Summary         |
| m : `string`                                                                               |               | Message to log. |

| Name         | Default Value | Summary         |
| ------------ | ------------- | --------------- |
| m : `string` |               | Message to log. |

| **error**(m)                                                                                |               |                 |
| ------------------------------------------------------------------------------------------- | ------------- | --------------- |
| <p>Logs a message at <code>error</code> level.</p><p>\*\*Source:\*\*Logger.js, line 117</p> |               |                 |
| Name                                                                                        | Default Value | Summary         |
| m : `string`                                                                                |               | Message to log. |

| Name         | Default Value | Summary         |
| ------------ | ------------- | --------------- |
| m : `string` |               | Message to log. |

| **exception**(m)                                                                                |               |                                                                                  |
| ----------------------------------------------------------------------------------------------- | ------------- | -------------------------------------------------------------------------------- |
| <p>Logs a message at <code>exception</code> level.</p><p>\*\*Source:\*\*Logger.js, line 127</p> |               |                                                                                  |
| Name                                                                                            | Default Value | Summary                                                                          |
| m : `string` \| `Object`                                                                        |               | Message to log or an `object` containing information about the exception to log. |

| Name                     | Default Value | Summary                                                                          |
| ------------------------ | ------------- | -------------------------------------------------------------------------------- |
| m : `string` \| `Object` |               | Message to log or an `object` containing information about the exception to log. |

| **info**(m)                                                                               |               |                 |
| ----------------------------------------------------------------------------------------- | ------------- | --------------- |
| <p>Logs a message at <code>info</code> level.</p><p>\*\*Source:\*\*Logger.js, line 97</p> |               |                 |
| Name                                                                                      | Default Value | Summary         |
| m : `string`                                                                              |               | Message to log. |

| Name         | Default Value | Summary         |
| ------------ | ------------- | --------------- |
| m : `string` |               | Message to log. |

| **log**(m, type, css)                                                                                                                                                   |               |                                                                          |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------ |
| <p>Logs a message to the console using the specified <code>type</code> log level if it is allowed by the current log level.</p><p>\*\*Source:\*\*Logger.js, line 54</p> |               |                                                                          |
| Name                                                                                                                                                                    | Default Value | Summary                                                                  |
| m : `string` \| `Object`                                                                                                                                                |               | Message to log or an `object` containing information about an exception. |
| type : `string`Optional                                                                                                                                                 | "info"        | The log level, one of the registered log `levels`.                       |
| css : `string`Optional                                                                                                                                                  |               | CSS styling rules for the message.                                       |

| Name                     | Default Value | Summary                                                                  |
| ------------------------ | ------------- | ------------------------------------------------------------------------ |
| m : `string` \| `Object` |               | Message to log or an `object` containing information about an exception. |
| type : `string`Optional  | "info"        | The log level, one of the registered log `levels`.                       |
| css : `string`Optional   |               | CSS styling rules for the message.                                       |

| **warn**(m)                                                                                |               |                 |
| ------------------------------------------------------------------------------------------ | ------------- | --------------- |
| <p>Logs a message at <code>warn</code> level.</p><p>\*\*Source:\*\*Logger.js, line 107</p> |               |                 |
| Name                                                                                       | Default Value | Summary         |
| m : `string`                                                                               |               | Message to log. |

| Name         | Default Value | Summary         |
| ------------ | ------------- | --------------- |
| m : `string` |               | Message to log. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pentaho.com/pba-ctools/pentaho-cdf-api/cdf/logger.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
