dontexist
dontexist

Reputation: 5652

(How) can I log messages with another severity than "log" in Elm?

I know about Debug.log - which logs a message with log-severity - and Debug.crash - which crashes the application and logs a message with error-severity, but is there a way to log something with error, warning, or info severity without crashing the application?

Upvotes: 2

Views: 65

Answers (2)

AIon
AIon

Reputation: 13071

I've used elm-logger a while back. enter image description here

Upvotes: 1

bdukes
bdukes

Reputation: 155935

No, there is no other built-in logging in Elm. If you're just wanting to log to the console, you can use a port, or you can write a native module to call the warn and error methods directly.

Upvotes: 4

Related Questions