# 7. Set up a debug logger

Wallet SDK includes verbose logging which can be helpful for debugging. These logs are suppressed by default but can be forwarded to any logging implementation you desire.

```typescript
import { setLoggers } from "@railgun-community/wallet";

/**
 * Sets up custom loggers for the engine.
 *
 * This function configures the engine to use custom logging functions that
 * prefix messages with timestamps and appropriate labels.
 *
 * - For standard logs: Prefixes with "Engine log: [timestamp]"
 * - For error logs: Prefixes with "Engine error: [timestamp]"
 *
 * The configured loggers will output to the console using console.log and console.error.
 *
 * @example
 * // Set up custom engine loggers
 * setEngineLoggers();
 *
 */
export const setEngineLoggers = () => {
  const logMessage = (msg: any) => {
    console.log(`Engine log: ${new Date()} `, msg);
  };
  const logError = (_msg: any) => {
    // console.error(`Engine error: ${new Date()} `, msg);
  };

  setLoggers(logMessage, logError);
};
```


---

# 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://docs.railgun.org/developer-guide/wallet/getting-started/7.-set-up-a-debug-logger.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.
