Source

Kephra / lib / Kephra / Log.pm

use strict;
use warnings;

package Kephra::Log;

our $level;
our @output;

sub init {
}

sub warning {
	warn timestamp(), ' ', (caller)[0], '::', $_[0];
}

sub error {
	die timestamp(), ' ', (caller)[0], '::', $_[0];
}

sub timestamp { sprintf("[%02u:%02u:%02u]", (localtime)[2,1,0]) }


1;