Clears the current Fiber logging context.
Extends the current Fiber logging context.
Extends the current Fiber logging context.
Struct
Struct
Value
Object
Object
Object
Clears the current Fiber logging context.
Log.context.clear
Log.info { "message with empty context" } Extends the current Fiber logging context.
Log.context.set a: 1
Log.context.set b: 2
Log.info { %q(message with a: 1, b: 2 context") }
h = {:c => "3"}
Log.context.set extra: h
Log.info { %q(message with a: 1, b: 2, extra: {"c" => "3"} context) }
h = {"c" => 3}
Log.context.set extra: h
Log.info { %q(message with a: 1, b: 2, extra: {"c" => 3} context) } Extends the current Fiber logging context.
Log.context.set a: 1
Log.context.set b: 2
Log.info { %q(message with a: 1, b: 2 context") }
h = {:c => "3"}
Log.context.set extra: h
Log.info { %q(message with a: 1, b: 2, extra: {"c" => "3"} context) }
h = {"c" => 3}
Log.context.set extra: h
Log.info { %q(message with a: 1, b: 2, extra: {"c" => 3} context) }
© 2012–2026 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.19.0/Log/Context.html