Skip to content

Instantly share code, notes, and snippets.

View Kev506's full-sized avatar

Kevin Andrews Kev506

  • Southwest England
  • 11:09 (UTC +01:00)
View GitHub Profile
@Karn
Karn / LogController.kt
Last active November 30, 2024 14:04
An example implementation of a process to write logs to disk asynchronously using RxJava
typealias LogElement = Triple<String, Int, String?>
object LogController {
private var flush = BehaviorSubject.create<Long>()
private var flushCompleted = BehaviorSubject.create<Long>()
private var LOG_LEVELS = arrayOf("", "", "VERBOSE",
"DEBUG",
"INFO",