# How to change log's level

In case you want to show just some especific information you can change log's level to filter the sensibility of what's shown, this guide has all the respective information.

This can be done in 2 ways:

## In runtime

In the browser's console, write:

```bash
window.loglevel("LEVEL")
```

then just press enter.

## In compilation time

### Step 1

Somewhere in app.component.ts or the environment.ts codes add the next line:

```typescript
<loglevel>.setLevel("LEVEL")
```

being loglevel the id of the variable that contains the imported module.

### Step 2

import log level from 'loglevel', like this:

```typescript
import * as loglevel from 'loglevel';
```

In both cases `LEVEL` refers to one of the next words:

* TRACE
* DEBUG
* INFO
* WARN
* ERROR
* SILENT

Is important to know that the first level contains the other ones and so on.

## Notes

* In both cases you can filter the messages from the developer tools native filter.
* In case you want to disable the log, just use the `SILENT` level.
* In case you want to learn more about loglevel read the README.md from node\_modules/loglevel.


---

# 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-change-logs-level.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.
