From 06b8bd93823d8fcb80cc6d2fefb6c18e52959aa3 Mon Sep 17 00:00:00 2001 From: Cody Ley-Han Date: Tue, 6 Aug 2019 22:44:43 -0700 Subject: [PATCH] Add a logger interface to the std modules --- vlib/log/log.v | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/vlib/log/log.v b/vlib/log/log.v index 2a3a68bc42..0b16217732 100644 --- a/vlib/log/log.v +++ b/vlib/log/log.v @@ -7,11 +7,19 @@ import term const ( FATAL = 1 ERROR = 2 - WARN = 3 - INFO = 4 - DEBUG =5 + WARN = 3 + INFO = 4 + DEBUG = 5 ) +interface Logger { + fatal(s string) + error(s string) + warn(s string) + info(s string) + debug(s string) +} + struct Log{ mut: level int