Re: [AD] Patch to change the logfile name (4.3.10)

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


On 2008-10-23, Colin Ward <lists@xxxxxxxxxx> wrote:
> I hope that this fits in neatly but someone else might have a suggestion
> about how better to do it.
> 
> I wanted to change src/allegro.c so that it could output its allegro.log log
> file to a place other than the current directory.  My beta testers were
> complaining (as beta testers do) about log files being left "laying
> around."
> 
> So I added a #define in include/allegro/internal/aintern.h thus:
> 
> #define ALLEGRO_LOGFILE_NAME "allegro.log"
> 
> And changed src/allegro.c to use it.  So if a platform wants to change the
> log file name they can simply #undef and then re#define it in their
> platform specific header file (the one defined by ALLEGRO_INTERNAL_HEADER
> in the platform's *cfg.h file).

I don't think it needs to be that complicated.  In src/allegro.c you
could just have:

    #ifdef ALLEGRO_AMIGA
	#define LOGFILE "blahblah"
    #else
	#define LOGFILE	"allegro.log"
    #endif

Peter





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