aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Daemon please flush the log entries too?  (Read 3465 times)

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Daemon please flush the log entries too?
« on: October 09, 2005, 12:01:25 PM »

Gentlemen,

I was hoping that in the latests CVS I would have the logging from the daemon when I run it in fully detached mode, but it appears that this is not yet flushed? Can somebody code that into on of the next releases please?

It would be much appreciated, since now the daemon doesn't show anything other then "credit file is loaded". And I have a problem connecting to KAD appearantly with the daemon, where the monolith works like a charm.

Thanks.
« Last Edit: October 09, 2005, 12:15:47 PM by vdb »
Logged
A waste is a terrible thing to mind.

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: Daemon please flush the log entries too?
« Reply #1 on: December 10, 2005, 01:18:48 PM »

I was hoping the detached daemon would flush it's entries by now, but it seems the CVS 20051210 still does not do this. Could somebody please take a look at this before releasing the 2.1 version?

Thanks.
Logged
A waste is a terrible thing to mind.

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: Daemon please flush the log entries too?
« Reply #2 on: December 11, 2005, 10:05:56 PM »

That's rather odd, since amuled does call the flush function for the log. The code is the same as in normal aMule. I'll look into it.
Logged

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: Daemon please flush the log entries too?
« Reply #3 on: December 11, 2005, 10:31:58 PM »

It's the detached form of the daemon which doesn't log anything, if you run the "regular" amuled everything is fine. Probably has to do with the output which the detachement does not have anymore?
Logged
A waste is a terrible thing to mind.

lfroen

  • Guest
Re: Daemon please flush the log entries too?
« Reply #4 on: December 12, 2005, 07:16:06 AM »

The problem imho is that log is opened before amuled is forked. It seems that log output desc became messed up in the child process, and thus flush() calls have no effect.
No, it  have nothing to do with detaching stdout from terminal (imho, again).
Logged

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: Daemon please flush the log entries too?
« Reply #5 on: December 17, 2005, 01:05:53 PM »

To add again to this thread, it seems that now something has been "fixed" in today's CVS (20051217), but it's not quite working yet: Now there are no entries in the logfile at all, not even the credit file loading line:

[me@mine .aMule]$ cat logfile
[me@mine .aMule]$

I really hope that this will be added before the 2.1 release, it would really top the detached daemon off to be used as a default service for Linux boxed.
« Last Edit: December 17, 2005, 01:06:28 PM by vdb »
Logged
A waste is a terrible thing to mind.

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: Daemon please flush the log entries too?
« Reply #6 on: December 17, 2005, 03:46:00 PM »

Problem found, should work in the next snapshot.

EDIT: Till then, you can work-around the problem by using the "--enable-stdin" command-line argument.
Logged

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: Daemon please flush the log entries too?
« Reply #7 on: December 18, 2005, 06:52:07 PM »

It works, you guys are great!!!!  :baby:
Logged
A waste is a terrible thing to mind.