Cleanup: IO: Use CLOG and fmtlib for tracing OBJ/PLY/STL messages #130107

Merged
Jesse Yurkovich merged 3 commits from deadpin/blender:cleanup-streams-objplystl into main 2024-11-12 20:49:14 +01:00

OBJ, PLY, and STL used a mix of fprintf, std::cout, and std::cerr to
trace warnings, errors, and general messages to the console.

Now, we instead use CLOG which provides real facilities for warnings and
errors and generally removes the need to pull in and use the heavy
<iostream> machinery.

For traces that should always be printed, fmt::print is used since
CLOG currently doesn't provide that particular level of trace.


Tests were only minimally changed to drop usage of streams while keeping
their prior usage of older stdio APIs. We can change to using fmtlib
there too if desired.

OBJ, PLY, and STL used a mix of fprintf, std::cout, and std::cerr to trace warnings, errors, and general messages to the console. Now, we instead use CLOG which provides real facilities for warnings and errors and generally removes the need to pull in and use the heavy `<iostream>` machinery. For traces that should always be printed, `fmt::print` is used since CLOG currently doesn't provide that particular level of trace. ---- Tests were only minimally changed to drop usage of streams while keeping their prior usage of older stdio APIs. We can change to using fmtlib there too if desired.
Jesse Yurkovich added 1 commit 2024-11-11 02:04:08 +01:00
Cleanup: IO: Use clog and fmtlib instead of streams
Some checks failed
buildbot/vexp-code-patch-lint Build done.
buildbot/vexp-code-patch-darwin-x86_64 Build done.
buildbot/vexp-code-patch-darwin-arm64 Build done.
buildbot/vexp-code-patch-linux-x86_64 Build done.
buildbot/vexp-code-patch-windows-amd64 Build done.
buildbot/vexp-code-patch-coordinator Build done.
656605e827
OBJ, PLY, and STL used a mix of fprintf, std::cout, and std::cerr to
trace warnings, errors, and general messages to the console.

Now, we instead use CLOG which provides real facilities for warnings and
errors and generally removes the need to pull in and use the heavy
<iostream> machinery.

For traces that should always be printed, `fmt::print` is used since
CLOG currently doesn't provide that particular level of trace.

Tests were only minimally changed to drop usage of streams while keeping
their prior usage of older stdio APIs.
Author
Member

@blender-bot build

@blender-bot build
Jesse Yurkovich added 1 commit 2024-11-11 02:41:27 +01:00
Fix build error
Some checks failed
buildbot/vexp-code-patch-lint Build done.
buildbot/vexp-code-patch-linux-x86_64 Build done.
buildbot/vexp-code-patch-darwin-arm64 Build done.
buildbot/vexp-code-patch-darwin-x86_64 Build done.
buildbot/vexp-code-patch-windows-amd64 Build done.
buildbot/vexp-code-patch-coordinator Build done.
edba4efa7a
Author
Member

@blender-bot build

@blender-bot build
Jesse Yurkovich added 1 commit 2024-11-11 03:54:08 +01:00
Init the CLOG subsystem for OBY mtl test
All checks were successful
buildbot/vexp-code-patch-lint Build done.
buildbot/vexp-code-patch-darwin-arm64 Build done.
buildbot/vexp-code-patch-linux-x86_64 Build done.
buildbot/vexp-code-patch-darwin-x86_64 Build done.
buildbot/vexp-code-patch-windows-amd64 Build done.
buildbot/vexp-code-patch-coordinator Build done.
4ac0accf6f
Author
Member

@blender-bot build

@blender-bot build
Jesse Yurkovich requested review from Aras Pranckevicius 2024-11-11 04:48:18 +01:00
Aras Pranckevicius approved these changes 2024-11-11 05:36:23 +01:00
Jesse Yurkovich merged commit c9c2fbc52d into main 2024-11-12 20:49:14 +01:00
Jesse Yurkovich deleted branch cleanup-streams-objplystl 2024-11-12 20:49:18 +01:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#130107
No description provided.