fpillet / NSLogger

A modern, flexible logging tool
Other
5k stars 573 forks source link

Log to file only #303

Closed hunble closed 3 years ago

hunble commented 3 years ago

Is this possible to log to a file only (like buffer file) and disable the remote (bonjour) based logging. NSlogger is very good at logging anyway; it would be a good idea if there was a way to make the network logging part optional?

Is there possibly a way already available? With the local network permission in iOS 14 and possible network strain, logging can cause, it kinda makes sense to have a file only version. I am actually thinking of using the file-based logging part in the production (I know sounds like a bad idea, but my app has certain requirements). I am not looking at alternatives because I have already used NSLogger for extensive logging don't want to change that.

hunble commented 3 years ago

Found it, Silly of me.

    if (logger->host == NULL && !(logger->options & kLoggerOption_BrowseBonjour))
    {
        // developer doesn't want any network connection
    }

so if host is null and kLoggerOption_BrowseBonjour is not set. Bonjour service is not used. It would be awesome if we mentioned these flags in the Readme.