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

DDTTYLogger: Allow to set default color profiles for all contexts at once #146

Conversation

rivera-ernesto
Copy link
Member

  • Using LOG_CONTEXT_ALL will associate a color profile log messages from all contexts.
  • Specific contexts can still set a different color profile on top.

In the future setForegroundColor:backgroundColor:forFlag:(int)mask could set the value for LOG_CONTEXT_ALL instead of context (0).

…once

* Using `LOG_CONTEXT_ALL` will associate a color profile log messages from all contexts.
* Specific contexts can still set a different color profile on top.
@@ -7,6 +7,8 @@

#import "DDLog.h"

#define LOG_CONTEXT_ALL NSIntegerMax
Copy link
Member Author

Choose a reason for hiding this comment

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

Instead of declaring and additional LOG_CONTEXT_ALL a negative context value could be used.

Copy link
Member

Choose a reason for hiding this comment

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

I think we should define a new constant/macro (I personally prefer constants because of the compiler can type check them).

Copy link
Member Author

Choose a reason for hiding this comment

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

What about negative values? @robbiehanson ?

I like to have to remember as few constants as possible;)

@bpoplauschi
Copy link
Member

@rivera-ernesto I think the pull request looks good, I will go ahead and merge it (unless you still need to work on this)

@rivera-ernesto
Copy link
Member Author

Thinking more about it I think its better to keep the LOG_CONTEXT_ALL instead of any negative number.
Specially since clearColorsForFlag:context: would be harder to implement.

I think I would keep the pull request as it is now.

bpoplauschi added a commit that referenced this pull request Nov 5, 2013
…file_forcontexts

DDTTYLogger: Allow to set default color profiles for all contexts at once
@bpoplauschi bpoplauschi merged commit c419eb2 into CocoaLumberjack:master Nov 5, 2013
@rivera-ernesto rivera-ernesto deleted the ttylogger_defaultcolorprofile_forcontexts branch November 5, 2013 05:34
rivera-ernesto pushed a commit to rivera-ernesto/CocoaLumberjack that referenced this pull request Nov 5, 2013
…lag: to LOG_CONTEXT_ALL

Until now this method applied to only the default context `(0)`.

Follows CocoaLumberjack#146.
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.

None yet

2 participants