fix: Update port and improve logging

- Change server port from 8086 to 8080
- Use `console.print_info` for logging instead of `println`
- Improve error handling in `decode_generic`
- Update JSONRPC imports for consistency
- Add `console.print_stderr` for not found methods
- Refactor `DBCalendar.list` to remove redundant `println`
- Add `console.print_info` for logging fallback
- Introduce `print_info` in console module for blue text output
This commit is contained in:
Mahmoud-Emad
2025-09-22 10:24:15 +03:00
parent 255b8da0e7
commit bb0b9d2ad9
10 changed files with 59 additions and 51 deletions

View File

@@ -3,6 +3,7 @@ module logger
import os
import freeflowuniverse.herolib.core.texttools
import freeflowuniverse.herolib.data.ourtime
import freeflowuniverse.herolib.ui.console
@[params]
pub struct LogItemArgs {
@@ -77,10 +78,10 @@ fn (mut l Logger) write_to_console(args LogItemArgs, t ourtime.OurTime) ! {
for i, line in lines {
if i == 0 {
println('${timestamp} [${error_indicator}] [${category}] ${line}')
console.print_info('${timestamp} [${error_indicator}] [${category}] ${line}')
} else {
// Indent continuation lines
println('${timestamp} [${error_indicator}] [${category}] ${line}')
console.print_info('${timestamp} [${error_indicator}] [${category}] ${line}')
}
}
}