all: various improvements

* Add os.File.flush() call to fix writing log into files.
* Add comma as TextHandler fields separator.
* Add struct_adapter()
* Add field() generic function to creating Field instances.
* Add new write_to_file.v example.
* Rename Record.field() to Record.add()
This commit is contained in:
ge committed 2026-03-28 18:23:57 +03:00
1 parent c6d53758b3
commit b423c161af
6 files changed
+129 -10

No files matched your search

+2 -2
View File
@@ -15,7 +15,7 @@ fn main() {
}
log.info().message('Hello, World!').send()
log.info().field('random_string', rand.string(5)).send()
log.info().field('answer', 42).field('computed_by', 'Deep Thought').send()
log.info().add('random_string', rand.string(100)).send()
log.info().add('answer', 42).add('computed_by', 'Deep Thought').send()
log.error().message('this line contains error').error(error('oops')).send()
}