Skip to content

Fields names are not printed for C structures #55

@shtirlic

Description

@shtirlic

Here is the stock slog output:

slog.SetDefault(slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{Level: programLevel})))
time=2024-01-05T02:18:08.689+07:00 level=DEBUG msg="XDGSurface SetData" x.data:=0x16e6cc0
time=2024-01-05T02:18:08.729+07:00 level=DEBUG msg=handleMapXDGToplevel topLevel={p:0x1786ba0}
time=2024-01-05T02:18:08.729+07:00 level=DEBUG msg=handleMapXDGToplevel s.topLevelList.Len()=0
time=2024-01-05T02:18:08.729+07:00 level=DEBUG msg=handleMapXDGToplevel s.topLevelList.Len()=1
time=2024-01-05T02:18:08.729+07:00 level=DEBUG msg=focusTopLevel "prev surface:"={p:<nil>}
time=2024-01-05T02:18:08.729+07:00 level=DEBUG msg=focusTopLevel "current surface:"={p:0x18598b0}
time=2024-01-05T02:18:08.729+07:00 level=DEBUG msg="XDGSurface SceneTree()" x.p="&{client:0x17c34c0 resource:0x16e75c0 surface:0x18598b0 link:{prev:0x17c34d8 next:0x17c34d8} role:1 role_resource:0x16e8a90 anon0:[160 107 120 1 0 0 0 0] popups:{prev:0x17c0680 next:0x17c0680} added:true configured:true configure_idle:<nil> scheduled_serial:1 configure_list:{prev:0x17c06a8 next:0x17c06a8} current:{configure_serial:1 geometry:{x:0 y:0 width:540 height:487}} pending:{configure_serial:1 geometry:{x:0 y:0 width:540 height:487}} initialized:true initial_commit:false events:{destroy:{listener_list:{prev:0x1574540 next:0x17c1430}} ping_timeout:{listener_list:{prev:0x17c06f8 next:0x17c06f8}} new_popup:{listener_list:{prev:0x17c0708 next:0x17c0708}} configure:{listener_list:{prev:0x17c0718 next:0x17c0718}} ack_configure:{listener_list:{prev:0x17c0728 next:0x17c0728}}} data:0x16e6cc0 role_resource_destroy:{link:{prev:0x16e8af0 next:0x16e8af0} notify:0x7fd40605ac90}}

This is output by stock tint

	slog.SetDefault(slog.New(
		tint.NewHandler(os.Stderr, &tint.Options{
			Level:      programLevel,
			TimeFormat: time.TimeOnly,
		}),
	))
02:21:46 DBG XDGSurface SetData x.data:=0x2cdc520
02:21:46 DBG handleMapXDGToplevel topLevel={0x2db68c0}
02:21:46 DBG handleMapXDGToplevel s.topLevelList.Len()=0
02:21:46 DBG handleMapXDGToplevel s.topLevelList.Len()=1
02:21:46 DBG focusTopLevel "prev surface:"={<nil>}
02:21:46 DBG focusTopLevel "current surface:"={0x2d7d5a0}
02:21:46 DBG XDGSurface SceneTree() x.p="&{0x2ce6c10 0x2cdc960 0x2d7d5a0 {0x2ce6c28 0x2ce6c28} 1 0x2cec230 [192 104 219 2 0 0 0 0] {0x2de2770 0x2de2770} true true <nil> 1 {0x2de2798 0x2de2798} {1 {0 0 540 487}} {1 {0 0 540 487}} true false {{{0x2b6ae00 0x2ce86d0}} {{0x2de27e8 0x2de27e8}} {{0x2de27f8 0x2de27f8}} {{0x2de2808 0x2de2808}} {{0x2de2818 0x2de2818}}} 0x2cdc520 {{0x2cec290 0x2cec290} 0x7fc9cb193c90}}"
02:21:46 DBG XDGSurface SceneTree() x.p.data=0x2cdc520

see the XDGSurface SceneTree() x.p= log line, in tint output there is no C structure fileds

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions