Skip to content

Commit 39fedc2

Browse files
committed
docs: migration
1 parent 31b4c86 commit 39fedc2

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

docs/content/setup/migrations/v11.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,6 @@ Imperative methods have been aligned with the MapLibre GL API as far as possible
185185
- More complete API by adding:
186186
- `easeTo()`
187187

188-
189-
190-
191-
192188
## Changes to `LocationManager` Module
193189

194190
### `GeolocationPosition` Type
@@ -242,3 +238,19 @@ The `NativeUserLocation`, which previously was used for `renderMode="native"`, h
242238
```
243239

244240
This component only relies on the default MapLibre Native user location implementations without any custom React Native customizations.
241+
242+
## Changes to `LogManager` Module
243+
244+
The `Logging` module has been renamed to `LogManager` for consistency with other modules.
245+
246+
If you want to implement a custom log handler, use the `onLog` function instead of `setLogCallback`:
247+
248+
```diff
249+
-Logging.setLogCallback((event) => {
250+
+LogManager.onLog((event) => {
251+
console.log(event.message);
252+
return true;
253+
});
254+
```
255+
256+
The `LogLevel` `warning` has been renamed to `warn` to match `console.warn`.

src/modules/log/LogManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import NativeLogModule from "./NativeLogModule";
88
export type LogLevel = "error" | "warn" | "info" | "debug" | "verbose";
99

1010
interface LogEvent {
11-
message: string;
1211
level: LogLevel;
13-
tag: string | null;
12+
tag: string;
13+
message: string;
1414
}
1515

1616
/**

0 commit comments

Comments
 (0)