Skip to content

Ultra simple, ultra lightweight logging library for Haxe

License

Notifications You must be signed in to change notification settings

onehundredfeet/hlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Ultra simple, ultra lightweight logging library for Haxe

Features

  • Use like 'trace' - No objects to reference, just call the functions below.
  • Captures trace as well
  • Coloured messages - Very simple colourization for terminals
  • Performance - If the level is excluded, the string will not be evaluated, saving interpolation.

Usage

import log.Log;

class Test {
    public static function main() {
        initLogging(VERBOSE);
         // In order of level
        verbose('Info that borders on spew');
        info('Even more info');
        message('Normal message, equivalent to regular trace');
        warning('Waring message');
        debug('Some extra debugging information');
        error('Error message');
        critical('Critical failure');
    }
}

Outputs

Verbose: Test.main [line 127] : Info that borders on spew
Info: Test.main [line 116] : Even more info
Message: Test.main [line 94] : Normal message, equivalent to regular trace
Warning: Test.main [line 83] : Waring message
Debug: Test.main [line 105] : Some extra debugging information
Error: Test.main [line 72] : Error message
Critical: Test.main [line 61] : Critical failure

About

Ultra simple, ultra lightweight logging library for Haxe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages