warning: erlang n00b ahead.
i'm trying grasp of erlang, , trying basic hello world application cowboy. i'm simulating error, returning invalid value somewhere in code, , trying interpret error, is:
=error report==== 11-jul-2013::15:45:00 === error in process <0.167.0> exit value: {{try_clause,{ok, {http_req,#port<0.3619>,ranch_tcp,keepalive,<0.167.0>,<<3 bytes>>,'http/1.1', {{127,0,0,1},60312},<<9 bytes>>,undefined,8081,<<1 byte>>,undefined,<<0 bytes>>,undefined,[],[{<<10 bytes>>,<<11 bytes>>},{<<4 bytes>>,<<14 bytes>>},{<<6 bytes>>,<<3 bytes>>}],[],undefined,[],waiting,undefined,<<0 bytes>>,false,waiting,[],<<0 bytes>>,undefined}}}, [{cowboy_handler,handler_init,4,[...
i've setup application rebar, , i'm running with:
erl -pa ebin deps/*/ebin -s myapp
as can see, error ends "..." makes me think being truncated. there way print full report?
and, there way make pretty-print it?
thanks!
what see sasl's tty handler. formats , writes reports console. during formatting cut useful data. avoid it, use error_logger_mf_h
handler this:
create app.config
file pass vars sasl:
[ {sasl, [ {sasl_error_logger, {file, "sasl.log"}}, {errlog_type, all}, {error_logger_mf_dir, "."}, % log directory {error_logger_mf_maxbytes, 10485760}, % 10 mb max file size {error_logger_mf_maxfiles, 5} % 5 files max ]} ].
then bring erl node started sasl. logs printed sasl.log
erl -boot start_sasl -config app.config
Comments
Post a Comment