# How to use the WMLogger's instance

Sometimes is necesary to show some information using the console, but it's important to have under control what is shown; WMLogger's instance is a custom logger that allows you to control the sensibility and levels to show, so follow this guide in order to use it correctly.

## 1. Import the module

You can use the next line:

```typescript
import { WMLogger } from '@mobilize/logging';
```

## 2. Using methods

WMLogger has 4 methods that can be used to log information, these are the next ones:

```typescript
const msg = "LOG MESSAGE";

WMLogger.instance().debug(msg);
WMLogger.instance().info(msg);
WMLogger.instance().warn(msg);
WMLogger.instance().error(msg);
```

Every method will log the message in a different level, being this levels:

* DEBUG
* INFO
* WARN
* ERROR


---

# 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.gapvelocity.ai/webmap/general/frontend/guides/wmlogger/how-to-use-the-wmloggers-instance.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.
