-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
71 changed files
with
531 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
docs/logger-core/logger-core/com.chrynan.logger/-async-logger/-async-logger.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[logger-core](../../../index.md)/[com.chrynan.logger](../index.md)/[AsyncLogger](index.md)/[AsyncLogger](-async-logger.md) | ||
|
||
# AsyncLogger | ||
|
||
[common]\ | ||
fun [AsyncLogger](-async-logger.md)() |
40 changes: 40 additions & 0 deletions
40
docs/logger-core/logger-core/com.chrynan.logger/-async-logger/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//[logger-core](../../../index.md)/[com.chrynan.logger](../index.md)/[AsyncLogger](index.md) | ||
|
||
# AsyncLogger | ||
|
||
[common]\ | ||
abstract class [AsyncLogger](index.md) : [Logger](../-logger/index.md) | ||
|
||
An abstract class implementation of the [Logger](../-logger/index.md) interface allowing for use of kotlin coroutines and suspend functions. This effectively allows for asynchronous logging of messages. | ||
|
||
Example usage: | ||
|
||
```kotlin | ||
class MyAsyncLogger( | ||
override val coroutineScope: CoroutineScope, | ||
private val api: Api | ||
) : AsyncLogger() { | ||
|
||
override suspend fun logAsync(logType: LogType, tag: String, message: String?, throwable: Throwable?) { | ||
api.logMessage(message).await() | ||
} | ||
} | ||
``` | ||
|
||
## Constructors | ||
|
||
| | | | ||
|---|---| | ||
| [AsyncLogger](-async-logger.md) | [common]<br>fun [AsyncLogger](-async-logger.md)() | | ||
|
||
## Functions | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [log](log.md) | [common]<br>override fun [log](log.md)(logType: [LogType](../-log-type/index.md), tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?, throwable: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)?)<br>Performs the action to log the provided details. | | ||
|
||
## Properties | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [isEnabled](is-enabled.md) | [common]<br>open override var [isEnabled](is-enabled.md): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false<br>Determines whether this [Logger](../-logger/index.md) instance should be used to output logs. The default value is up to the implementation and platform, but generally should be `false` to prevent accidental logging in a production environment. Explicitly set the value to be certain whether logging is enabled or not. | |
10 changes: 10 additions & 0 deletions
10
docs/logger-core/logger-core/com.chrynan.logger/-async-logger/is-enabled.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//[logger-core](../../../index.md)/[com.chrynan.logger](../index.md)/[AsyncLogger](index.md)/[isEnabled](is-enabled.md) | ||
|
||
# isEnabled | ||
|
||
[common]\ | ||
open override var [isEnabled](is-enabled.md): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false | ||
|
||
Determines whether this [Logger](../-logger/index.md) instance should be used to output logs. The default value is up to the implementation and platform, but generally should be `false` to prevent accidental logging in a production environment. Explicitly set the value to be certain whether logging is enabled or not. | ||
|
||
**Note:** that it is up to the [Logger](../-logger/index.md) implementation to prevent logging if this value returns `false`. |
8 changes: 8 additions & 0 deletions
8
docs/logger-core/logger-core/com.chrynan.logger/-async-logger/log.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//[logger-core](../../../index.md)/[com.chrynan.logger](../index.md)/[AsyncLogger](index.md)/[log](log.md) | ||
|
||
# log | ||
|
||
[common]\ | ||
override fun [log](log.md)(logType: [LogType](../-log-type/index.md), tag: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), message: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?, throwable: [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)?) | ||
|
||
Performs the action to log the provided details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
docs/logger-core/logger-core/com.chrynan.logger/-delegating-logger/equals.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[logger-core](../../../index.md)/[com.chrynan.logger](../index.md)/[DelegatingLogger](index.md)/[equals](equals.md) | ||
|
||
# equals | ||
|
||
[common]\ | ||
open operator override fun [equals](equals.md)(other: [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
6 changes: 6 additions & 0 deletions
6
docs/logger-core/logger-core/com.chrynan.logger/-delegating-logger/hash-code.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[logger-core](../../../index.md)/[com.chrynan.logger](../index.md)/[DelegatingLogger](index.md)/[hashCode](hash-code.md) | ||
|
||
# hashCode | ||
|
||
[common]\ | ||
open override fun [hashCode](hash-code.md)(): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.