# Registering Appenders at Runtime

You can programmatically register appenders at runtime by using the `registerAppender()` function exposed in the LogBox object. Here is the function API:

```javascript
registerAppender(name, class, [properties={},] [layout="",] [levelMin=0,] [levelMax=4]);
```

> **Info** Please note that registering dynamic appenders at runtime is tricky as some objecs might already have references to some appenders. We recommend registering appenders at configuration load or when the application starts up.


---

# Agent Instructions: 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:

```
GET https://logbox.ortusbooks.com/extending-logbox/creating-custom-appenders/registering-appenders-at-runtime.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
