class Arborist::GlobalDebug

Defined in:

arborist.cr

Class Method Summary

Macro Summary

Class Method Detail

def self.decrement #

[View source]
def self.disable! #

[View source]
def self.enable(enable : Bool) #

[View source]
def self.enable! #

[View source]
def self.enabled? #

[View source]
def self.increment #

[View source]
def self.indent #

[View source]
def self.prefix(prefix_str : String) #

[View source]
def self.reset_indent #

[View source]

Macro Detail

macro puts(str) #

Changing this logging from a function to a macro made a 10x performance improvement. To see the change in the test suite, you may run tests like: NOLOG=true crystal spec To see the change in the compiled binary, you may compile like: NOLOG=true ./build.sh Without the NOLOG=true environment variable, GlobalDebug.puts behaves like normal, as if it were defined as a function.


[View source]