yuhua-chen / MCLog

Xcode plugin for filtering the console area.
MIT License
586 stars 55 forks source link

Filter doesn't respect newlines #44

Closed DanielAsher closed 7 years ago

DanielAsher commented 8 years ago

Hi,

thanks for a great plugin!

I use XCodeColors and KZLinkedConsole. When filtering with MCLog it looks like newlines are removed and becomes difficult to read.

Could you verify this?

thanks.

yuhua-chen commented 8 years ago

I tracked the KZLinkedConsole code. Not verifying in Xocde, but i can tell from the code that we did swizzle the same method. I copied part of the code:

static func swizzleMethods() {
        guard let storageClass = NSClassFromString("NSTextStorage") as? NSObject.Type,
            let textViewClass = NSClassFromString("NSTextView") as? NSObject.Type else {
                return
        }

        do {
            try storageClass.jr_swizzleMethod("fixAttributesInRange:", withMethod: "kz_fixAttributesInRange:")
            try textViewClass.jr_swizzleMethod("mouseDown:", withMethod: "kz_mouseDown:")
        }
        catch {
            Swift.print("Swizzling failed")
        }
    }

For now, these two plugins may not work together. I'm thinking the solution or maybe have discuss with contributor of KZLinkedConsole.

DanielAsher commented 8 years ago

many thanks for your quick response :)

DanielAsher commented 7 years ago

Currently MCLog incompatible with KZLinkedConsole.