package com.craigvg.lichun_android.utils import android.util.Log /** * Thin structured-logging facade for the WebSocket / networking layer. * * Replaces ad-hoc `printStackTrace()` calls (which write to stderr and are * effectively invisible in production) with leveled [android.util.Log] output * under a single consistent tag, so failures are filterable in logcat / * Crashlytics breadcrumbs. */ object Logger { const val WS_TAG = "WebSocketManager" fun d(tag: String, message: String) { Log.d(tag, message) } fun w(tag: String, message: String, throwable: Throwable? = null) { if (throwable != null) Log.w(tag, message, throwable) else Log.w(tag, message) } fun e(tag: String, message: String, throwable: Throwable? = null) { if (throwable != null) Log.e(tag, message, throwable) else Log.e(tag, message) } }