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:
@@ -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}')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user