Skip to content

feat: migrate our log library to tracing#2494

Merged
CommanderStorm merged 41 commits intomaplibre:mainfrom
CommanderStorm:tracing-v5
Jan 14, 2026
Merged

feat: migrate our log library to tracing#2494
CommanderStorm merged 41 commits intomaplibre:mainfrom
CommanderStorm:tracing-v5

Conversation

@CommanderStorm
Copy link
Copy Markdown
Member

@CommanderStorm CommanderStorm commented Jan 9, 2026

This PR is the next time I am trying to migrate from log to tracing.

This time, it is the simple implementation again with the only config being the MARTIN_LOG_FORMAT env-var options.
I chose to default to pretty in development and compact in release builds, since this likely matches most users preferences pretty well.

Adding this to the CLI would be really simple, but lets not do that now to prevent the previous bikeshedding.

@CommanderStorm CommanderStorm changed the title feat: Tracing v5 feat: migrate our log library to tracing (attempt 5) Jan 9, 2026
@CommanderStorm CommanderStorm changed the title feat: migrate our log library to tracing (attempt 5) feat: migrate our log library to tracing Jan 9, 2026

This comment was marked as resolved.

This comment was marked as resolved.

CommanderStorm and others added 4 commits January 10, 2026 02:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@CommanderStorm CommanderStorm marked this pull request as ready for review January 13, 2026 00:35
Copy link
Copy Markdown
Member

@nyurik nyurik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! One request before you merge: I do not like custom env vars MARTIN_FORMAT / MARTIN_CP_FORMAT when they are right next to a standard RUST_LOG. I searched github and chatted - seems RUST_LOG_FORMAT is a fairly common one for this.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@CommanderStorm CommanderStorm enabled auto-merge (squash) January 13, 2026 09:05
Copy link
Copy Markdown
Member

@nyurik nyurik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should init_tracing get the value from the env itself, rather than getting it via a parameter? I'm ok either way, just something to consider for simplicity

@CommanderStorm
Copy link
Copy Markdown
Member Author

I think the "how does this work" is simpler to understand if we pull the env-var-parsing and changing one level up instead of abstracting it away.

What we are doing there is resonably non-standard imo.

@CommanderStorm CommanderStorm merged commit 34a66dc into maplibre:main Jan 14, 2026
80 of 84 checks passed
@CommanderStorm CommanderStorm mentioned this pull request Jan 10, 2026
CommanderStorm added a commit that referenced this pull request Jan 28, 2026
## 🤖 New release

* `martin-tile-utils`: 0.6.8 -> 0.6.9 (✓ API compatible changes)
* `mbtiles`: 0.15.0 -> 0.15.1 (✓ API compatible changes)
* `martin-core`: 0.2.5 -> 0.2.6 (✓ API compatible changes)
* `martin`: 1.2.0 -> 1.3.0

<details><summary><i><b>Changelog</b></i></summary><p>


## `mbtiles`

<blockquote>

##
[0.15.1](mbtiles-v0.15.0...mbtiles-v0.15.1)
- 2026-01-27

### Added

- add MLT decoding support
([#2512](#2512))
- migrate our log library to tracing
([#2494](#2494))

### Other

- unignore `diff_and_patch_bsdiff` test with unique SQLite database
names ([#2480](#2480))
- *(mbtiles)* remove the prefix-ism around how files are named for
binary diff copy and simpify their naming
([#2478](#2478))
- *(mbtiles)* add assertion messages what we are checking to the copy
tests ([#2477](#2477))
</blockquote>

## `martin-core`

<blockquote>

##
[0.2.6](martin-core-v0.2.5...martin-core-v0.2.6)
- 2026-01-27

### Added

- migrate our log library to tracing
([#2494](#2494))
- *(martin-core)* Allow glyph ranges more than 0xFFFF
([#2438](#2438))

### Fixed

- *(perf)* Remove FontSources.masks as they were consuming large amounts
of memory even when no font sources were set
([#2519](#2519))
- improve error message if no SVG sprite files are present
([#2516](#2516))

### Other

- move our imports to tracing
([#2500](#2500))
- *(deps)* shear our dependencys
([#2497](#2497))
</blockquote>

## `martin`

<blockquote>

##
[1.3.0](martin-v1.2.0...martin-v1.3.0)
- 2026-01-27

### Added

- *(srv)* Add `route_prefix` configuration for native subpath support
without the need of a reverse proxy override
([#2523](#2523))
- add MLT decoding support
([#2512](#2512))
- migrate our log library to tracing
([#2494](#2494))
- improve martin-cp progress output time estimate
([#2491](#2491))
- *(pg)* include ID column info for tables
([#2485](#2485))
- *(pg)* support PostgreSQL materialized views
([#2279](#2279))
- *(martin-core)* Allow glyph ranges more than 0xFFFF
([#2438](#2438))

### Fixed

- *(ui)* clipboard copy for http://0.0.0.0:3000 and unify
implementations ([#2487](#2487))
- the `Copy` icon displaying nicely, next to the text and with enough
padding ot all items
([#2483](#2483))
- update copy text to include icon for better visibility
([#2482](#2482))
- *(perf)* Remove FontSources.masks as they were consuming large amounts
of memory even when no font sources were set
([#2519](#2519))
- improve error message if no SVG sprite files are present
([#2516](#2516))

### Other

- move our request logging to tracing
([#2508](#2508))
- move our imports to tracing
([#2500](#2500))
- *(deps)* shear our dependencys
([#2497](#2497))
- *(ui)* adjust margin for copy icon in URL component
([#2489](#2489))
- unignore `diff_and_patch_bsdiff` test with unique SQLite database
names ([#2480](#2480))
- *(mbtiles)* remove the prefix-ism around how files are named for
binary diff copy and simpify their naming
([#2478](#2478))
- *(mbtiles)* add assertion messages what we are checking to the copy
tests ([#2477](#2477))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow jsonl-style logging for servers

3 participants