mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Add initial link+sync support.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright 2024 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.signal.core.util.logging
|
||||
|
||||
/**
|
||||
* Convenience method to replace `.also { Log.v(TAG, "message") }`
|
||||
*/
|
||||
fun <T> T.logV(tag: String, message: String, throwable: Throwable? = null): T {
|
||||
Log.v(tag, message, throwable)
|
||||
return this
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method to replace `.also { Log.d(TAG, "message") }`
|
||||
*/
|
||||
fun <T> T.logD(tag: String, message: String, throwable: Throwable? = null): T {
|
||||
Log.d(tag, message, throwable)
|
||||
return this
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method to replace `.also { Log.i(TAG, "message") }`
|
||||
*/
|
||||
fun <T> T.logI(tag: String, message: String, throwable: Throwable? = null): T {
|
||||
Log.i(tag, message, throwable)
|
||||
return this
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method to replace `.also { Log.w(TAG, "message") }`
|
||||
*/
|
||||
fun <T> T.logW(tag: String, message: String, throwable: Throwable? = null): T {
|
||||
Log.w(tag, message, throwable)
|
||||
return this
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience method to replace `.also { Log.e(TAG, "message") }`
|
||||
*/
|
||||
fun <T> T.logE(tag: String, message: String, throwable: Throwable? = null): T {
|
||||
Log.e(tag, message, throwable)
|
||||
return this
|
||||
}
|
||||
Reference in New Issue
Block a user