walter01
19th December 2008, 11:52
Hi,
I have added logging lines to my report script and I want to use conditional compiling of the logging functions. How do I set this up ? I have added the code below but it doesn't matter if I change the LOGGING value. The logging is always compiled. Can someone tell me what I'm doing wrong ?
declaration:
#define LOGGING 1
before.program:
xlog.init()
after.program:
xlog.close()
detail.1:
before.layout:
...
...
xlog.regel("I", "msg67 Orderline blocked." & str$(tdsls041.pono))
...
...
functions:
function xlog.init()
{
#ifdef LOGGING
...
...
setup logfile code
...
...
#endif
}
function xlog.regel(string log.code(1), string log.tekst(150) )
{
#ifdef LOGGING
...
...
write a logfile record code
...
...
#endif
}
function xlog.close()
{
#ifdef LOGGING
...
...
close logfile code
...
...
#endif
}
thanks,
Walter
I have added logging lines to my report script and I want to use conditional compiling of the logging functions. How do I set this up ? I have added the code below but it doesn't matter if I change the LOGGING value. The logging is always compiled. Can someone tell me what I'm doing wrong ?
declaration:
#define LOGGING 1
before.program:
xlog.init()
after.program:
xlog.close()
detail.1:
before.layout:
...
...
xlog.regel("I", "msg67 Orderline blocked." & str$(tdsls041.pono))
...
...
functions:
function xlog.init()
{
#ifdef LOGGING
...
...
setup logfile code
...
...
#endif
}
function xlog.regel(string log.code(1), string log.tekst(150) )
{
#ifdef LOGGING
...
...
write a logfile record code
...
...
#endif
}
function xlog.close()
{
#ifdef LOGGING
...
...
close logfile code
...
...
#endif
}
thanks,
Walter