Erlang/OTP Forums

Author Message

<  Erlyweb mailing list  ~  Disabling debug logging

Guest
Posted: Fri Dec 28, 2007 5:18 pm Reply with quote
Guest
I'm using the mysql driver and would like to disable debug level
logging. I've poked around in the erlydb and mysql driver code and
haven't seen an obvious way to do it without changing code. Ideally
I'd like to be able to flip a switch on erlydb itself and do this. Is
there anything like this now?

--Kevin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Fri Dec 28, 2007 5:50 pm Reply with quote
Guest
The only way to do it right now is when calling erlydb:start().

This is how I start erlydb:

erlydb:start(mysql, [{hostname, "localhost"},
{username, "username"}, {password, "password"},
{database, "vimagi"}
,{logfun, fun log/4}]),


This is my log/4 function:

log(Module, Line, Level, FormatFun) ->
case Level of
debug ->
ok;
_ ->
Func = case Level of
info ->
info_msg;
normal ->
info_msg;
error ->
error_msg;
warn ->
warning_msg
end,
{Format, Params} = FormatFun(),
error_logger:Func("~w:~b: "++ Format,
[Module, Line | Params])
end.

On Dec 28, 2007 9:17 AM, Kevin A. Smith <kevin@hypotheticalabs.com> wrote:
>
> I'm using the mysql driver and would like to disable debug level
> logging. I've poked around in the erlydb and mysql driver code and
> haven't seen an obvious way to do it without changing code. Ideally
> I'd like to be able to flip a switch on erlydb itself and do this. Is
> there anything like this now?
>
> --Kevin
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Sat Dec 29, 2007 9:54 pm Reply with quote
Guest
Thanks for pointing this out. Now I'm drowning in much less console
spew Smile

Has anyone compiled a list of all the startup options erlydb uses? If
not, I'd be happy to put together a list based on the 0.7 codebase for
the wiki.

--Kevin
On Dec 28, 2007, at 12:49 PM, Yariv Sadan wrote:

>
> The only way to do it right now is when calling erlydb:start().
>
> This is how I start erlydb:
>
> erlydb:start(mysql, [{hostname, "localhost"},
> {username, "username"}, {password,
> "password"},
> {database, "vimagi"}
> ,{logfun, fun log/4}]),
>
>
> This is my log/4 function:
>
> log(Module, Line, Level, FormatFun) ->
> case Level of
> debug ->
> ok;
> _ ->
> Func = case Level of
> info ->
> info_msg;
> normal ->
> info_msg;
> error ->
> error_msg;
> warn ->
> warning_msg
> end,
> {Format, Params} = FormatFun(),
> error_logger:Func("~w:~b: "++ Format,
> [Module, Line | Params])
> end.
>
> On Dec 28, 2007 9:17 AM, Kevin A. Smith <kevin@hypotheticalabs.com>
> wrote:
>>
>> I'm using the mysql driver and would like to disable debug level
>> logging. I've poked around in the erlydb and mysql driver code and
>> haven't seen an obvious way to do it without changing code. Ideally
>> I'd like to be able to flip a switch on erlydb itself and do this. Is
>> there anything like this now?
>>
>> --Kevin
>>
>>>
>>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum