m-mullins / elm-console / Console

Module that wraps the defacto set of features provided by the console object in most browsers

see: https://developer.mozilla.org/en-US/docs/Web/API/console

Utility

assert : Basics.Bool -> a -> a

Wrap the console.assert function https://console.spec.whatwg.org/#assert https://developer.mozilla.org/en-US/docs/Web/API/Console/assert

Console.assert (1 == 0) "1 is not 0"

Console.assert (1 == 0) ( 1, 0 )

clear : a -> a

Wrap the console.clear function https://console.spec.whatwg.org/#clear https://developer.mozilla.org/en-US/docs/Web/API/Console/clear

Console.clear 1234

count : a -> a

Wrap the console.count function https://console.spec.whatwg.org/#count https://developer.mozilla.org/en-US/docs/Web/API/Console/count

Console.count "Am i here?"

countReset : a -> a

Wrap the console.countReset function https://console.spec.whatwg.org/#countReset https://developer.mozilla.org/en-US/docs/Web/API/Console/countReset

Console.countReset "Am i here?"

Logging

log : String -> a -> a

Wrap the console.log function https://console.spec.whatwg.org/#log https://developer.mozilla.org/en-US/docs/Web/API/Console/log

Console.log "log message" ( 1, 0 )

warn : String -> a -> a

Wrap the console.warn function https://console.spec.whatwg.org/#warn https://developer.mozilla.org/en-US/docs/Web/API/Console/warn

Console.warn "warn message" ( 1, 0 )

debug : String -> a -> a

Wrap the console.debug function https://console.spec.whatwg.org/#debug https://developer.mozilla.org/en-US/docs/Web/API/Console/debug

Console.debug "debug message" ( 1, 0 )

info : String -> a -> a

Wrap the console.info function https://console.spec.whatwg.org/#info https://developer.mozilla.org/en-US/docs/Web/API/Console/info

Console.info "info message" ( 1, 0 )

error : String -> a -> a

Wrap the console.error function https://console.spec.whatwg.org/#error https://developer.mozilla.org/en-US/docs/Web/API/Console/error

Console.error "error message" ( 1, 0 )

More logging

dir : a -> a

Wrap the console.dir function https://console.spec.whatwg.org/#dir https://developer.mozilla.org/en-US/docs/Web/API/Console/dir

Console.dir { x = 1 }

dirxml : a -> a

Wrap the console.dirxml function https://console.spec.whatwg.org/#dirxml https://developer.mozilla.org/en-US/docs/Web/API/Console/dirxml

Console.dirxml { x = 1 }

table : a -> a

Wrap the console.table function https://console.spec.whatwg.org/#table https://developer.mozilla.org/en-US/docs/Web/API/Console/table

Console.table [ 1, 2, 3, 4 ]

Console.table { x = 1, y = 2 }

trace : a -> a

Wrap the console.trace function https://console.spec.whatwg.org/#trace https://developer.mozilla.org/en-US/docs/Web/API/Console/trace

Console.trace ()

Log group

group : String -> a -> a

Wrap the console.group function https://console.spec.whatwg.org/#group https://developer.mozilla.org/en-US/docs/Web/API/Console/group

Console.group 1234

groupCollapsed : String -> a -> a

Wrap the console.groupCollapsed function https://console.spec.whatwg.org/#groupCollapsed https://developer.mozilla.org/en-US/docs/Web/API/Console/groupCollapsed

Console.groupCollapsed 1234

groupEnd : a -> a

Wrap the console.groupEnd function https://console.spec.whatwg.org/#groupEnd https://developer.mozilla.org/en-US/docs/Web/API/Console/groupEnd

Console.groupEnd 1234

Timing

time : String -> a -> a

Wrap the console.time function https://console.spec.whatwg.org/#time https://developer.mozilla.org/en-US/docs/Web/API/Console/time

Console.time "timer1" 123123

timeEnd : String -> a -> a

Wrap the console.timeEnd function https://console.spec.whatwg.org/#timeEnd https://developer.mozilla.org/en-US/docs/Web/API/Console/timeEnd

Console.timeEnd "timer1" 123123

timeLog : String -> a -> a

Wrap the console.timeLog function https://console.spec.whatwg.org/#timeLog https://developer.mozilla.org/en-US/docs/Web/API/Console/timeLog

Console.timeLog "timer1" 123123