XcodeColors icon indicating copy to clipboard operation
XcodeColors copied to clipboard

Xcode 8 kills code colors

Open vinthewrench opened this issue 7 years ago • 11 comments

http://openradar.appspot.com/radar?id=4934039337172992

Thanks a lot Apple.

vinthewrench avatar Sep 19 '16 17:09 vinthewrench

"Apple has decided to rid the Xcode world of plugins and instead has introduced Xcode extensions. As of right now, only source code extensions are currently supported. This only allows you to modify the source code of an existing file when running your extension. This does not allow us to modify anything with respect to the Xcode console. "

vinthewrench avatar Sep 19 '16 17:09 vinthewrench

A workaround I come up with is to write my own formatter , add color emoji to the different log leve, like this:

LogLevelTitle = @[@"❗️Error",@"❓Warning",@"💧Info",@"✅Debug",@"🔤Verbose"];

qiulang avatar Sep 20 '16 09:09 qiulang

The SwiftyBeaver logging framework is using emojis as fallback in Xcode 8 and you can also set your own ones.

screenshot 2016-09-20 at 09 04 30

default console logging is with hearts:

console

skreutzberger avatar Sep 20 '16 09:09 skreutzberger

I use DDLog extensively in my codes so I really don't want to introduce another log framework. But it is good to know that I am "on the right track". Thanks!

qiulang avatar Sep 20 '16 10:09 qiulang

Using emoji is REALLY cool!

devxoul avatar Sep 21 '16 18:09 devxoul

There seems to be alternatives to allow 3rd party plugins: https://github.com/XVimProject/XVim/blob/master/INSTALL_Xcode8.md

Tested and approved.

AdrienGiboire avatar Oct 05 '16 08:10 AdrienGiboire

what @AdrienGiboire linked works in Xcode 8

https://github.com/XVimProject/XVim/blob/master/INSTALL_Xcode8.md

gblazex avatar Nov 04 '16 11:11 gblazex

@robbiehanson Thank you for your hard work maintaining this project all these years. It was a real disappointment to have plug-ins removed from Xcode 8.0 — I hope Apple brings back a way for XcodeColors to live on.

While it isn't a direct replacement for what XcodeColors provided, the new 5.0 release of the pure Swift CleanroomLogger project uses color-coded characters to indicate the severity of a given log message:

◽️ Verbose messages are tagged with a small gray square — easy to ignore
◾️ Debug messages have a black square; easier to spot, but still de-emphasized
🔷 Info messages add a splash of color in the form of a blue diamond
🔶 Warnings are highlighted with a fire-orange diamond
🛑 Error messages stand out with a red stop sign — hard to miss!

Hope some folks find it useful.

emaloney avatar Jan 09 '17 13:01 emaloney

Its mind boggling apple still hasn't added color support into the Xcode console...

lupinglade avatar Jan 11 '17 03:01 lupinglade

Hey, guys, I have created Printer – a "fancy" way to print logs on the console. It has almost everything which may help you during an app development.

@qiulang @skreutzberger

hemangshah avatar May 03 '17 06:05 hemangshah

I'm now just using base CocoaLumberJack with special emoji icons instead and seems to be working quite well.

`- (NSString *)formatLogMessage:(DDLogMessage *)logMessage { NSString *msg = logMessage.message;

NSString *logLevel;
NSString *logLevel;

switch (logMessage.flag) {
    case DDLogFlagError:
        logLevel = self.outputIcons ? @"🔥 Error" : @"Error";
        break;
    case DDLogFlagWarning:
        logLevel = self.outputIcons ? @"⚠️ Warning" : @"Warning";
        break;
    case DDLogFlagInfo:
        logLevel = self.outputIcons ? @"ℹ️ Info" : @"Info";
        break;
    case DDLogFlagDebug:
        logLevel = self.outputIcons ? @"🐞 Debug" : @"Debug";
        break;
    case DDLogFlagVerbose:
        logLevel = self.outputIcons ? @"📣 Verbose" : @"Verbose";
        break;
}`

nneuberger1 avatar Mar 20 '18 14:03 nneuberger1