mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 00:05:50 +03:00
[PR #1296] Local Tz logs #1242
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#1242
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/lldap/lldap/pull/1296
Author: @vic1707
Created: 9/16/2025
Status: 🔄 Open
Base:
main← Head:TZ-logs📝 Commits (7)
8055e45needschronofeature095c325add newLLDAP_LOCAL_TZ_LOGenv8b724e5wipeb8e1fcfix frontend timezoned644c8ccentralize frontend timezone fixc43ff85refactor attribute formattinge36c4b4specify date format explicitely📊 Changes
8 files changed (+65 additions, -30 deletions)
View changed files
📝
Cargo.lock(+1 -0)📝
app/src/components/create_user.rs(+3 -1)📝
app/src/components/group_table.rs(+2 -1)📝
app/src/components/user_details_form.rs(+28 -17)📝
app/src/components/user_table.rs(+2 -1)📝
app/src/lib.rs(+19 -0)📝
server/Cargo.toml(+1 -1)📝
server/src/logging.rs(+9 -9)📄 Description
Fixes: #1290
Following the discussion we had in #1290, here's a proposition to make lldap logs abide by desired timezone.
This PR introduces a new
LLDAP_LOCAL_TZ_LOGenv variable to make the logs use the defined timezone instead of default UTC.Due to how
tracing_subscriberworks, enablingLLDAP_LOCAL_TZ_LOGgives the same kind of logs as whenLLDAP_RAW_LOGis enabled for simplicity as thewith_timermethod cannot be used without atracing_subscriber::fmt::Layer<S>inner object (doc). But another layer can be made if that behavior isn't desired.This changes uses the
chronofeature fromtracing-subscriberinstead oflocal-timebecause the later only yielded<unknown time>for the timestamp (apparently due to atimecrate issue, see https://github.com/tokio-rs/tracing/issues/2715 for reference.Results:

New
LLDAP_LOCAL_TZ_LOGUnchanged

LLDAP_RAW_LOGUnchanged default behavior

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.