mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
log: enum for logger level
This commit is contained in:

committed by
Alexander Medvednikov

parent
9bfea5e60b
commit
ee52b4166f
@ -1,12 +1,12 @@
|
||||
import log
|
||||
|
||||
fn main(){
|
||||
mut l := log.Log{log.INFO, 'terminal'}
|
||||
l.info('info')
|
||||
l.warn('warn')
|
||||
l.error('error')
|
||||
l.debug('no debug')
|
||||
l.set_level(log.DEBUG)
|
||||
l.debug('debug')
|
||||
l.fatal('fatal')
|
||||
fn main() {
|
||||
mut l := log.Log { log.LogLevel.info, 'info', true }
|
||||
l.info('info')
|
||||
l.warn('warn')
|
||||
l.error('error')
|
||||
l.debug('no debug')
|
||||
l.set_level(log.DEBUG)
|
||||
l.debug('debug')
|
||||
l.fatal('fatal')
|
||||
}
|
||||
|
Reference in New Issue
Block a user