2
votes

I've just managed to setup SwiftyBeaver logging framework for my Xcode project, it works fine but Xcode raises an error every time I call my logging framework (that does not prevent me to compile nor to log properly though).

1

What I've done is just declaring my logging variable outside of a class' scope with some configurations like below:

let log = SwiftyBeaver.self

#if DEBUG
    let logMinLevel = SwiftyBeaver.Level.debug
    let logFormat = "$DHH:mm:ss.SSS$d $C$L$c $N.$F:$l - $M"
#else
    let logMinLevel = SwiftyBeaver.Level.warning
    let logFormat = "$DHH:mm:ss.SSS$d $C$L$c - $M"
#endif

Is there any way to get rid of that error message?

1
If it is inside a closure, use self.log... - shallowThought
@shallowThought I won't be able to do that since log is not a member of any class - Louis
@EricAya Same problem after renaming my variable to logg - Louis
@Slowbro I see. It's defined globally. In this case I wonder why the error says member - shallowThought
@shallowThought Yeah this is super weird - Louis

1 Answers

0
votes

It seems that the issue disappeared.

After reporting it I changed my IDE for AppCode, then I came back to Xcode recently and the problem is no longer here.