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 ?

alexmiller13: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.

alexmiller13:08:48

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

alexmiller13:08:11

what happens if your logger can’t keep up?

alexmiller13: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

alexmiller13: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.