|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
trying error_logger under yawsHi, I tried the example 2-23 in page 33 from the upcoming book ‘Building Web Applications with Erlang’ . The example is simple as shown below <erl> out(Arg) -> error_logger:info_msg("~p:~p User Entered the System~n", [?MODULE,?LINE]), {html, "Logger"}. </erl> It is supposed to output this: =INFO REPORT==== 16-Jan-2012::13:38:52 === m1:13 User Entered the System But it is outputing this instead. Logger I also tried to do this: Logger = error_logger:info_msg("~p:~p User Entered the System~n",[?MODULE,?LINE]), {html, "Logger"}. But it did not help. Please let me know what I am doing wrong. Thanks, Mohamed ==================== ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Erlyaws-list mailing list Erlyaws-list@... https://lists.sourceforge.net/lists/listinfo/erlyaws-list |
|
|
Re: trying error_logger under yawsThe logging message won't appear in your browser, if that's what
you're expecting. Look up your logdir in your yaws.conf -- it defaults to /usr/local/var/log/yaws -- and look in the report.log file there. You'll find the error_logger message there. Also, if you run yaws interactively (yaws -i) you'll also see the logging message appear on your console. --steve On Fri, Mar 30, 2012 at 9:22 AM, Chenini, Mohamed <MChenini@...> wrote: > Hi, > > > > I tried the example 2-23 in page 33 from the upcoming book ‘Building Web > Applications with Erlang’ . > > The example is simple as shown below > > > > <erl> > > > > out(Arg) -> > > error_logger:info_msg("~p:~p User Entered the System~n", > > [?MODULE,?LINE]), > > {html, "Logger"}. > > > > </erl> > > > > It is supposed to output this: > > > > =INFO REPORT==== 16-Jan-2012::13:38:52 === > > m1:13 User Entered the System > > > > But it is outputing this instead. > > Logger > > > > I also tried to do this: > > > > Logger = error_logger:info_msg("~p:~p User Entered the > System~n",[?MODULE,?LINE]), > > {html, "Logger"}. > > > > > > But it did not help. > > > > Please let me know what I am doing wrong. > > > > Thanks, > > Mohamed > > > > ==================== > This email/fax message is for the sole use of the intended > recipient(s) and may contain confidential and privileged information. > Any unauthorized review, use, disclosure or distribution of this > email/fax is prohibited. If you are not the intended recipient, please > destroy all paper and electronic copies of the original message. > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Erlyaws-list mailing list > Erlyaws-list@... > https://lists.sourceforge.net/lists/listinfo/erlyaws-list > ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Erlyaws-list mailing list Erlyaws-list@... https://lists.sourceforge.net/lists/listinfo/erlyaws-list |
|
|
Re: trying error_logger under yawsHi,
Indeed I found it in the log at /home/u1c332/web/var/log/yaws/report.log =INFO REPORT==== 29-Mar-2012::16:20:23 === m45:14 User Entered the System I will try it interactively too. Thanks for this info. Regards, Mohamed -----Original Message----- From: vinoski@... [mailto:vinoski@...] On Behalf Of Steve Vinoski Sent: Friday, March 30, 2012 1:22 PM To: Chenini, Mohamed Cc: erlyaws-list@... Subject: Re: [Erlyaws-list] trying error_logger under yaws The logging message won't appear in your browser, if that's what you're expecting. Look up your logdir in your yaws.conf -- it defaults to /usr/local/var/log/yaws -- and look in the report.log file there. You'll find the error_logger message there. Also, if you run yaws interactively (yaws -i) you'll also see the logging message appear on your console. --steve On Fri, Mar 30, 2012 at 9:22 AM, Chenini, Mohamed <MChenini@...> wrote: > Hi, > > > > I tried the example 2-23 in page 33 from the upcoming book 'Building > Web Applications with Erlang' . > > The example is simple as shown below > > > > <erl> > > > > out(Arg) -> > > error_logger:info_msg("~p:~p User Entered the System~n", > > [?MODULE,?LINE]), > > {html, "Logger"}. > > > > </erl> > > > > It is supposed to output this: > > > > =INFO REPORT==== 16-Jan-2012::13:38:52 === > > m1:13 User Entered the System > > > > But it is outputing this instead. > > Logger > > > > I also tried to do this: > > > > Logger = error_logger:info_msg("~p:~p User Entered the > System~n",[?MODULE,?LINE]), > > {html, "Logger"}. > > > > > > But it did not help. > > > > Please let me know what I am doing wrong. > > > > Thanks, > > Mohamed > > > > ==================== > This email/fax message is for the sole use of the intended > recipient(s) and may contain confidential and privileged information. > Any unauthorized review, use, disclosure or distribution of this > email/fax is prohibited. If you are not the intended recipient, please > destroy all paper and electronic copies of the original message. > > > ---------------------------------------------------------------------- > -------- > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Erlyaws-list mailing list > Erlyaws-list@... > https://lists.sourceforge.net/lists/listinfo/erlyaws-list > This email/fax message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of this email/fax is prohibited. If you are not the intended recipient, please destroy all paper and electronic copies of the original message. ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Erlyaws-list mailing list Erlyaws-list@... https://lists.sourceforge.net/lists/listinfo/erlyaws-list |
| Free embeddable forum powered by Nabble | Forum Help |