Skip to content

Add INCLUDE_LOG to remove logs from build#155

Merged
StephaneTriomphe merged 1 commit into
feature/imgfrom
feature/add_enable_log
Jun 4, 2026
Merged

Add INCLUDE_LOG to remove logs from build#155
StephaneTriomphe merged 1 commit into
feature/imgfrom
feature/add_enable_log

Conversation

@StephaneTriomphe

Copy link
Copy Markdown
Contributor

No description provided.

By default logs are included.
INCLUDE_LOG 0 strips all logs from binary
Comment thread lib/api/logger.h
# define MAX_LOG_LEVEL ERROR_LOG_LEVEL
#endif

#if !defined(INCLUDE_LOG)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of the flag?
Just a shortcut instead of defininig MAX_LOG_LEVEL to NO_LOG_LEVEL directly ?
CFLAGS += -DMAX_LOG_LEVEL =-1 wouldn't work directly?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAX_LOG_LEVEL is set by each file before including logger.h.
If I understand your proposal, MAX_LOG_LEVEL defined with cflags will be redefined, so it will not work, no ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I missed this point!

Comment thread lib/api/logger.h
# define MAX_LOG_LEVEL ERROR_LOG_LEVEL
#endif

#if !defined(INCLUDE_LOG)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I missed this point!

@StephaneTriomphe StephaneTriomphe merged commit fbb6c61 into feature/img Jun 4, 2026
3 checks passed
@StephaneTriomphe StephaneTriomphe deleted the feature/add_enable_log branch June 4, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants