delba / Log

An extensible logging framework for Swift
MIT License
830 stars 63 forks source link

Type of expression is ambiguous without more context #19

Closed VivienGiraud closed 8 years ago

VivienGiraud commented 8 years ago

Hi,

Since Swift3 update I have this strange behaviour Type of expression is ambiguous without more context with that simple code:

import Log

let Log = Logger(formatter: .Detailed,
                 theme: .TomorrowNight,
                 minLevel: .Trace)

extension Formatters {
    static let Detailed = Formatter("[%@] %@.%@:%@ %@: %@", [ //Error is just here
        .Date("yyyy-MM-dd HH:mm:ss.SSS"),
        .File(fullPath: false, fileExtension: false),
        .Function,
        .Line,
        .Level,
        .Message
        ])
}

extension Themes {
    static let TomorrowNight = Theme(
        trace:   "#C5C8C6",
        debug:   "#81A2BE",
        info:    "#B5BD68",
        warning: "#F0C674",
        error:   "#CC6666"
    )
}

Any help would be appreciated. Vivien

VivienGiraud commented 8 years ago

Any idea? I'm running out of idea :/

VivienGiraud commented 8 years ago

It seams that changing from UpperCamelCase to lowerCamelCase for: extension Formatters { static let Detailed = Formatter("[%@] %@.%@:%@ %@: %@", [ //Error is just here .Date("yyyy-MM-dd HH:mm:ss.SSS"), .File(fullPath: false, fileExtension: false), .Function, .Line, .Level, .Message ]) } Did the trick. Anyway, no syntax colour with Xcode 8 :(