Enable/disable logger from Info Editor #78223

Open
opened 2020-06-24 21:09:07 +02:00 by Mateusz Grzeliński · 6 comments

Status: Task has been abandoned. This feature is only nice to have, but there is no clean solution to implement or it requires a lot of changes in code

Description
Currently loggers can be enables/disables only via regex in command line arguments. Exposing them in list like menu will make life easier.

Design:

  • List borrowed from UV map menu:
    obraz.png
  • Desired behaviour:
    user can filter visible loggers per info editorEngineer plan:**
  • Currently:
    loggers are enabled/diasabled only based on regex (see clg_ctx_filter_check) active loggers are stored in CLogContext (ctx->types)
    ** loggers are dynamic, and lazy evaluated, that is why it is not possible to know list all known loggers

Work plan

I need feedback how to:

    • convert regex based exclude filter to flag-like mask
    • list all possigle loggers in static (precompiled) way
    • connect list of loggers with UI list
**Status:** Task has been abandoned. This feature is only nice to have, but there is no clean solution to implement or it requires a lot of changes in code **Description** Currently loggers can be enables/disables only via regex in command line arguments. Exposing them in list like menu will make life easier. **Design:** * List borrowed from UV map menu: ![obraz.png](https://archive.blender.org/developer/F8640923/obraz.png) * Desired behaviour: **user can filter visible loggers per info editor**Engineer plan:** * Currently: **loggers are enabled/diasabled only based on regex (see `clg_ctx_filter_check`)** active loggers are stored in `CLogContext` (`ctx->types`) ** loggers are dynamic, and lazy evaluated, that is why it is not possible to know list all known loggers **Work plan** I need feedback how to: - - [ ] convert regex based exclude filter to flag-like mask - - [ ] list all possigle loggers in static (precompiled) way - - [ ] connect list of loggers with UI list
Mateusz Grzeliński self-assigned this 2020-06-24 21:09:07 +02:00
Author
Member

Added subscribers: @grzelins, @mont29

Added subscribers: @grzelins, @mont29
Author
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Author
Member

Listing all possible loggers is problematic.
The obvious solution to this is some kind of register/unregister mechanism. Unfortunately all of loggers are defined as static CLG_LogRef LOG = {"bke.anim_sys"}; what makes it very convienient to use, but impossible to register dynamically. If we want to keep the curent paradigm od logging, I can see 2 solutions:

  1. preprocess codebase and gather all usagas of CLG_LogRef and create static list of loggers (similar to makesdna)
  2. manually create list of loggers, something like this: static CLG_LogRef loggers- [ ] = {{.identifier = "bke.anim_sys", .doc_str = "usefull doc"}};. The usage would look similar to: static CLG_LogRef *LOG = CLG_get("bke.anim_sys");

@ideasman42 can I have your thoughts on this? Both solutions are not ideal, I already talked to @mont29

Listing all possible loggers is problematic. The obvious solution to this is some kind of register/unregister mechanism. Unfortunately all of loggers are defined as `static CLG_LogRef LOG = {"bke.anim_sys"};` what makes it very convienient to use, but impossible to register dynamically. If we want to keep the curent paradigm od logging, I can see 2 solutions: 1) preprocess codebase and gather all usagas of `CLG_LogRef` and create static list of loggers (similar to `makesdna`) 2) manually create list of loggers, something like this: `static CLG_LogRef loggers- [ ] = {{.identifier = "bke.anim_sys", .doc_str = "usefull doc"}};`. The usage would look similar to: `static CLG_LogRef *LOG = CLG_get("bke.anim_sys");` @ideasman42 can I have your thoughts on this? Both solutions are not ideal, I already talked to @mont29
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

Same as #80072 (Create python API for CLOG), this needs a decision if this should confirmed/on the roadmap or not.

Same as #80072 (Create python API for CLOG), this needs a decision if this should confirmed/on the roadmap or not.
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:24:21 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#78223
No description provided.