Skip to content

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

Merged
rivera-ernesto merged 1 commit into
CocoaLumberjack:masterfrom
c0diq:nsloglevel
Jul 9, 2015
Merged

Don't override defines in case they're already set at project level#551
rivera-ernesto merged 1 commit into
CocoaLumberjack:masterfrom
c0diq:nsloglevel

Conversation

@Autoc0diq

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread Classes/DDFileLogger.m

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 rivera-ernesto added the awaiting response Issues that are waiting for a response - usually from the reporter label Jul 7, 2015
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 removed the awaiting response Issues that are waiting for a response - usually from the reporter label Oct 12, 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