Skip to content

mac-virtualcam: Hide logging behind debug flag#4508

Merged
jp9000 merged 1 commit into
obsproject:masterfrom
sebastian-s-beckmann:gxalpha-replace-vcam-dlog
Apr 13, 2021
Merged

mac-virtualcam: Hide logging behind debug flag#4508
jp9000 merged 1 commit into
obsproject:masterfrom
sebastian-s-beckmann:gxalpha-replace-vcam-dlog

Conversation

@sebastian-s-beckmann

Copy link
Copy Markdown
Member

Description

Hides the DLog and DLogFunc macros behind the -DDEBUG flag, causing the logs to only appear in testing environments.

On production build, calls to these macros will result in nothing happening.

Motivation and Context

Console logs in this amount:
Bildschirmfoto 2021-04-12 um 17 35 38
are hilarious.

On production, there will be no more unnecessary debug logs, leaving the console like this:
Bildschirmfoto 2021-04-12 um 18 14 05

How Has This Been Tested?

macOS 11.2.3, Intel

Building in Xcode keeps the logs, outside of it with the -DCMAKE_BUILD_TYPE=RelWithDebInfo flag, the logs are gone.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM WizardCM added kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Non-breaking change which makes code smaller or more readable labels Apr 12, 2021
Hides the DLog and DLogFunc macros behind the -DDEBUG flag, causing the
logs to only appear in testing environments.

On production build, calls to these macros will result in nothing
happening.
@jp9000 jp9000 force-pushed the gxalpha-replace-vcam-dlog branch from 9514d41 to 94032e8 Compare April 13, 2021 12:27
@jp9000

jp9000 commented Apr 13, 2021

Copy link
Copy Markdown
Member

I've fixed it for you, but in the future, make sure to wrap your commit description text at 72 columns. Google "50/72 commits" for more info.

@sebastian-s-beckmann

Copy link
Copy Markdown
Member Author

Oh sorry, I'll be sure to look at it again

@jp9000 jp9000 merged commit 5708e64 into obsproject:master Apr 13, 2021
@RytoEX RytoEX added this to the OBS Studio 27.0 milestone Apr 13, 2021
@RytoEX

RytoEX commented Apr 13, 2021

Copy link
Copy Markdown
Member

Oh sorry, I'll be sure to look at it again

I've fixed it for you, but in the future, make sure to wrap your commit description text at 72 columns. Google "50/72 commits" for more info.

@gxalpha
For reference, we mention this in our contributing document under "Commit guidelines":

OBS Studio uses the 50/72 standard for commits. 50 characters max for the title (excluding module prefix), an empty line, and then a full description of the commit, wrapped to 72 columns max. See this link for more information: http://chris.beams.io/posts/git-commit/

@sebastian-s-beckmann sebastian-s-beckmann deleted the gxalpha-replace-vcam-dlog branch August 15, 2021 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Non-breaking change which makes code smaller or more readable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants