[interfacekit] Re: I can crash BeOS, how about you?

From user land, I think you want the following calls from be/support/
syslog.h:

void openlog_team(char *, int, int);
void syslog(int, char *, ...);
void closelog_team(void);

The first call is supposed to open the syslog for all threads in the 
team.  There is also a _thread version of this and close.  I have used 
the above three calls in my code to write to the /var/log/syslog file 
in my code.  The code I wrote looks like:

openlog("BePhoneyd: ", 0, LOG_DAEMON);

...

syslog(LOG_ERR, "This is my message with an int %d", myInt);

...

closelog_team();

This worked for me.  I read in a Be newsletter that the string passed 
when the log is opened is supposed to be appended to the log message in 
syslog (ie a process name) but found that didn't happen.  I entered a 
bug, but it never got fixed probably because it never was a big deal.

Hope this helps.  If you want to write to the syslog from kernel land, 
I am not sure what would be involved.  Good luck.

>
>I am currently in quite a bit of a pickle in my app_server progress. I 
am 
>attempting to get redraw to work properly, but when I ask the server 
to 
>actually do a drawing call for the base screen (and, thus, remove the 
bad LSD 
>trip effects, if you've played with the latest build), after 
attempting to 
>move the test window, BeOS stops responding *completely*. Rewriting 
the code 
>to do redraw a different way has yielded the *exact* same results. 
Here's 
>what I need to know:
>
>1) Should I/how do I write to the syslog?
>2) The code uses recursion quite a bit. Is it possible that this 
behavior 
>stems from a stack overflow?
>
>I'd really appreciate some help on this - the faster I get this thing 
fixed, 
>the happier everyone gets to be. :) TIA
>
>--DW
>
>
>
--
Jeremy Rand
jrand@xxxxxxxx

Other related posts: