Fork me on GitHub
#core-async
<
2016-08-18
>
val_waeselynck08:08:59

It's recommended to avoid performing IO in go blocks. What about logging? Is logging IO ?

Alex Miller (Clojure team)13:08:17

I think the question is, can it block arbitrarily long. Technically for logging, the answer is yes. Practically, the answer may be no.

Alex Miller (Clojure team)13:08:48

Some people run logging through an agent so there’s a queue in the middle (but beware that agent queues are unbounded)

Alex Miller (Clojure team)13:08:11

what happens if your logger can’t keep up?

Alex Miller (Clojure team)13:08:30

just something to think about

val_waeselynck13:08:44

@alexmiller: thanks, I'll check into my logger libs to find the answer. AFAICT the typical logging time is ~1ms

Alex Miller (Clojure team)13:08:48

right, typical logging is unlikely to be an issue. the question is what happens in atypical cases (run out of disk space, rolling a log file, you get a burst of 1000 log messages at the same time, etc). how much you care about that stuff and how likely it is are specific to your app.