@@ -33,7 +33,7 @@ public val StoreLogLevel.asSymbol: String
3333 }
3434
3535/* *
36- * Write a message to [StoreLogger]. Tag is the [Store.name] by default.
36+ * Write a message to [StoreLogger]. Tag is the [pro.respawn.flowmvi.api. Store.name] by default.
3737 */
3838public fun PipelineContext <* , * , * >.log (
3939 level : StoreLogLevel = StoreLogLevel .Debug ,
@@ -42,7 +42,7 @@ public fun PipelineContext<*, *, *>.log(
4242): Unit = config.logger(level, tag, message)
4343
4444/* *
45- * Write a message to [StoreLogger]. Tag is the [Store.name] by default.
45+ * Write a message to [StoreLogger]. Tag is the [pro.respawn.flowmvi.api. Store.name] by default.
4646 */
4747public fun PipelineContext <* , * , * >.log (
4848 e : Exception ,
@@ -87,3 +87,59 @@ public fun StoreLogger.warn(tag: String? = null, message: () -> String): Unit =
8787 */
8888public fun StoreLogger.error (tag : String? = null, message : () -> String ): Unit =
8989 log(StoreLogLevel .Error , tag, message)
90+
91+ /* *
92+ * Shorthand for [log] with [StoreLogLevel.Trace] as the log level.
93+ */
94+ public fun PipelineContext <* , * , * >.logt (
95+ tag : String? = config.name,
96+ message : () -> String
97+ ): Unit = log(StoreLogLevel .Trace , tag, message)
98+
99+ /* *
100+ * Shorthand for [log] with [StoreLogLevel.Debug] as the log level.
101+ */
102+ public fun PipelineContext <* , * , * >.logd (
103+ tag : String? = config.name,
104+ message : () -> String
105+ ): Unit = log(StoreLogLevel .Debug , tag, message)
106+
107+ /* *
108+ * Shorthand for [log] with [StoreLogLevel.Info] as the log level.
109+ */
110+ public fun PipelineContext <* , * , * >.logi (
111+ tag : String? = config.name,
112+ message : () -> String
113+ ): Unit = log(StoreLogLevel .Info , tag, message)
114+
115+ /* *
116+ * Shorthand for [log] with [StoreLogLevel.Warn] as the log level.
117+ */
118+ public fun PipelineContext <* , * , * >.logw (
119+ tag : String? = config.name,
120+ message : () -> String
121+ ): Unit = log(StoreLogLevel .Warn , tag, message)
122+
123+ /* *
124+ * Shorthand for [log] with [StoreLogLevel.Error] as the log level.
125+ */
126+ public fun PipelineContext <* , * , * >.loge (
127+ tag : String? = config.name,
128+ message : () -> String
129+ ): Unit = log(StoreLogLevel .Error , tag, message)
130+
131+ /* *
132+ * Shorthand for logging an exception with [StoreLogLevel.Error] as the log level.
133+ */
134+ public fun PipelineContext <* , * , * >.loge (
135+ e : Exception ,
136+ tag : String? = config.name
137+ ): Unit = log(e, StoreLogLevel .Error , tag)
138+
139+ /* *
140+ * Shorthand for logging an exception with [StoreLogLevel.Warn] as the log level.
141+ */
142+ public fun PipelineContext <* , * , * >.logw (
143+ e : Exception ,
144+ tag : String? = config.name
145+ ): Unit = log(e, StoreLogLevel .Warn , tag)
0 commit comments