English Amiga Board    


Go Back   English Amiga Board > » Coders > Coders. Language

Reply
 
Thread Tools
Old 23 May 2012, 17:48   #1
tygre
Registered User
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 157
IXEmul and SysLog - Any Experience?

Hi all!

While tinkering with thttpd, I realised that it should log a lot of interesting information using syslog. So, I installed SysLog v1.20 but no message from thttpd is captured by the syslogdeamon (which works with the examples provided in the LHA archive).

I am wondering if this lack of communication between thttpd and syslogdeamon could be because thttpd uses the IXEmul library. Has anyone any experience using syslog functions and IXEmul?

For sure, in thttpd, there is no call to open syslog.library but I cannot find such a call either in IXEmul: I can find calls to open various libraries:
Code:
ix_libs[] =
{
  { (void **)&DOSBase, "dos.library", 37 },
#ifndef __HAVE_68881__
  { (void **)&MathIeeeSingBasBase, "mathieeesingbas.library" },
  { (void **)&MathIeeeDoubBasBase, "mathieeedoubbas.library" },
  { (void **)&MathIeeeDoubTransBase, "mathieeedoubtrans.library" },
#endif
  { NULL, NULL }
};
but not syslog.library. I am using IXEmul v48.0 because I could not find the source for later versions.

Cheers!
Tygre
__________________
Tygre

--
"I have seen things you people would not believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time like tears in the rain. Time to die."
Roy Batty - Blade Runner
tygre is offline   Reply With Quote
Old 23 May 2012, 17:59   #2
tygre
Registered User
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 157
While going through IXEmul code, I found two implementations of the openlog() function:
Code:
void
openlog(const char *ident, int logstat, int logfac)
{
    usetup;
    register struct ixnet *p = (struct ixnet *)u.u_ixnet;
    register int network_protocol = p->u_networkprotocol;

    if (network_protocol == IX_NETWORK_AMITCP) {
        struct TagItem list[] = {
            {SBTM_SETVAL(SBTC_LOGTAGPTR), (ULONG)ident},
            {SBTM_SETVAL(SBTC_LOGSTAT), logstat},
            {SBTM_SETVAL(SBTC_LOGFACILITY), logfac},
            {TAG_END}
        };
        TCP_SocketBaseTagList(list);
    }
}
in ixnet/syslog.c and:
Code:
void
openlog(const char *ident, int logstat, int logfac)
{
    usetup;

    if (u.u_ixnetbase) {
    netcall(NET_openlog, ident, logstat, logfac);
    }
    else {
    if (ident != NULL)
        LogTag = (char *)ident;
    LogStat = logstat;
    if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0)
        LogFacility = logfac;
    }
}
in library/syslog.c.

So, it seems that when using IXNet, AmiTCP must be up and running, does it make sense? But what about the other definition?

Cheers!
Tygre
__________________
Tygre

--
"I have seen things you people would not believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time like tears in the rain. Time to die."
Roy Batty - Blade Runner
tygre is offline   Reply With Quote
Old 24 May 2012, 10:51   #3
phx
Registered User
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 265
There are two ways to use Syslog V1.20:
Either you open syslog.library and call the appropriate logging functions, or write your output to LOG: (assuming the LOG-Handler is running). In both cases you would have to adapt the thttpd source.

Ixemul probably emulates the syslog() function from Unix. So theoretically you wouldn't need to install another Syslog program. But I never used the log, so I don't know if it works.
phx is offline   Reply With Quote
Old 24 May 2012, 14:35   #4
tygre
Registered User
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 157
Hi PHX!

Thanks a lot for your answer... In the meantime, I also found other sources of problems, I will keep you posted!

Cheers!
Tygre
__________________
Tygre

--
"I have seen things you people would not believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser gate. All those moments will be lost in time like tears in the rain. Time to die."
Roy Batty - Blade Runner
tygre is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GCC and ixemul.library Rixa Coders. Language 16 06 June 2012 22:10
version 47 of ixemul..anyone? Welshieinnz request.Apps 3 24 July 2007 11:31
m4-1.4.2 for classic AmigaOS (not using IXemul) Paul News 1 24 October 2004 21:01


All times are GMT +2. The time now is 11:27.

-->

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Page generated in 0.11636 seconds with 9 queries