Re: [AD] allegro.log in release mode

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Sorry, haven't been able to get to this yet and won't this week or next week.

On 06/02/2015 7:56 PM, Trent Gamblin wrote:
Yes, a location is important if the game is installed in a non-writable
directory and you want a user to send you a log.

Trent

-----Original Message-----
From: SiegeLord [mailto:slabode@xxxxxxxxxx]
Sent: February 6, 2015 7:42 PM
To: alleg-developers@xxxxxxxxxx
Subject: Re: [AD] allegro.log in release mode

On 02/06/2015 06:34 PM, Trent Gamblin wrote:
This came up before but I don't remember what was done or planned about
it.
I'd like to be able to call al_enable_logging(bool) and enable logging
in release mode (or disable it in debug mode if you wanted to...)

Is the slight overhead of an if statement for every ALLEGRO_DEBUG
(etc) call too much? Should it be hidden behind a second preprocessor
directive so al_enable_logging would only work if Allegro was compiled
that way (might be confusing)?

Anybody have any suggestions that came up before before I start?

Trent

The overhead should be minimal, I'm sure, so I wouldn't worry about adding
an additional pre-processing directive (we can always add one in the future
anyway, if this proves to be a problem). Please make the API a bit more
forward compatible in case we want to set up a verbosity system. This would
just involve making it `al_set_logging_verbosity(int level)` with level > 0
just enabling logging for now. This would be set to 1 by default in debug
builds, and 0 otherwise. Also, I don't know if it's an option right now, but
perhaps a function to set the location of the logging file might be useful.

-SL

----------------------------------------------------------------------------
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
--
https://lists.sourceforge.net/lists/listinfo/alleg-developers


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/