1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

log: add seconds to terminal output too.

This commit is contained in:
Delyan Angelov 2019-08-30 12:56:02 +03:00 committed by Alexander Medvednikov
parent 13f3f79eb8
commit e3389e8ec1

View File

@ -54,7 +54,7 @@ pub fn (l Log) error(s string){
case 'terminal': case 'terminal':
f := term.red('E') f := term.red('E')
t := time.now() t := time.now()
println('[$f ${t.format()}] $s') println('[$f ${t.format_ss()}] $s')
default: default:
l.log_file(s, 'E') l.log_file(s, 'E')
@ -68,7 +68,7 @@ pub fn (l Log) warn(s string){
case 'terminal': case 'terminal':
f := term.yellow('W') f := term.yellow('W')
t := time.now() t := time.now()
println('[$f ${t.format()}] $s') println('[$f ${t.format_ss()}] $s')
default: default:
l.log_file(s, 'W') l.log_file(s, 'W')
@ -82,7 +82,7 @@ pub fn (l Log) info(s string){
case 'terminal': case 'terminal':
f := term.white('I') f := term.white('I')
t := time.now() t := time.now()
println('[$f ${t.format()}] $s') println('[$f ${t.format_ss()}] $s')
default: default:
l.log_file(s, 'I') l.log_file(s, 'I')
@ -96,7 +96,7 @@ pub fn (l Log) debug(s string){
case 'terminal': case 'terminal':
f := term.blue('D') f := term.blue('D')
t := time.now() t := time.now()
println('[$f ${t.format()}] $s') println('[$f ${t.format_ss()}] $s')
default: default:
l.log_file(s, 'D') l.log_file(s, 'D')