package log

import (
	"os"
	"testing"
	"time"
)

func TestNewLogger(t *testing.T) {
	w := NewFileWriter("log", "./test")
	logger := NewLogger(w, 2)
	logger.Error("NewLogger: %s", time.Now())
	logger.Warn("NewLogger: %s", time.Now())
	logger.Info("NewLogger: %s", time.Now())
	logger.Debug("NewLogger: %s", time.Now())
}

func TestNewPrinter(t *testing.T) {
	logger := New(os.Stdout, "", 2)
	logger.Println("NewPrinter: %s", time.Now())
	logger.Println("NewPrinter: %s", time.Now())
	logger.Println("NewPrinter: %s", time.Now())
	logger.Println("NewPrinter: %s", time.Now())
}
