Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't override defines in case they're already set at project level #551

Merged
merged 1 commit into from
Jul 9, 2015

Conversation

Autoc0diq
Copy link
Contributor

No description provided.

#define LOG_LEVEL 2
#ifndef DD_NSLOG_LEVEL
#define DD_NSLOG_LEVEL 2
#endif
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer a:

#ifndef LOG_LEVEL
    #define LOG_LEVEL 2
#endif

instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

LOG_LEVEL is very generic and it could be confused with the actual Cocoalumberjack log level. Here this define is specifically only used for NSLogs which is why I suggested renaming it to be clearer.

Copy link
Member

Choose a reason for hiding this comment

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

Well, this is internal to a .m file so we can use whatever we want, right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, the whole point of not redefining it if it's already defined is that it could be defined earlier, like let's say in Xcode build settings for a specific configuration (DEBUG). In this case, the naming is important to not be confusing.

rivera-ernesto added a commit that referenced this pull request Jul 9, 2015
Don't override defines in case they're already set at project level
@rivera-ernesto rivera-ernesto merged commit b3c5c77 into CocoaLumberjack:master Jul 9, 2015
@bpoplauschi bpoplauschi added this to the 2.0.2 milestone Oct 12, 2015
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.

3 participants