hlog

Simple logging library for Haxe
https://github.com/onehundredfeet/hlog

To install, run:

haxelib install hlog 1.0.0 

See using Haxelib in Haxelib documentation for more information.

README.md

Description

Ultra simple, ultra lightweight logging library for Haxe

Features

  • Use like 'trace' - No objects to reference, just call the functions below.
  • 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
Contributors
onehundredfeet
Version
1.0.0
Published
2 years ago
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub