Re: log files and stdout

"fred" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <011901c5e97e$0787f970$0401a8c0@FRED4>
" 2> /dev/null "

yes I know........still the software goes thru the actions of printing it, it is the device driver  that then dumps it to a void,
so potentially many m/c cycles could be saved by not needing it at all, no?

I still don't get it with the array of logfiles...lol

  ----- Original Message ----- 
  From: Andreas Fink 
  To: fred 
  Cc: devel 
  Sent: Friday, November 11, 2005 1:44 AM
  Subject: Re: log files and stdout -#- MailID:5HAA




  On 07.11.2005, at 14:38, fred wrote:


    Just a question about the logging mechanism that is annoying me.......

    if the configuration has set

    log-file="kannel.log"

    and you start ./bearerbox -v 0 smskannel2.conf 2>bearer.log &


    kannel.log and bearer.log contain the same lines !! I find no use for this duplication ............


  this is normal. Kannel logs to stderr and to any logfile you specify in the config.
  you can simply start bearerbox with 2> /dev/null and you dont have any duplicatas.





    is this how its supposed to be ? (or else its because I may have done something by accident to my code!!)

    my thinking is if a log-file = named is configured, well thats where all the logging should go,
    except perhaps stderr?  

    I am not really clear on what the idea is behind the array of logfiles ? why is it necessary ? etc?

    gwlib\log.c

    static struct {
        FILE *file;
        int minimum_output_level;
        char filename[FILENAME_MAX + 1]; /* to allow re-open */
        enum excl_state exclusive;
    } logfiles[MAX_LOGFILES];

    yeah, I'm reading the code, but it brings me more questions.....it might help
    if we knew what the author was thinking of?















  Andreas Fink

  Fink Consulting GmbH




  ---------------------------------------------------------------

  Tel: +41-61-6666332 Fax: +41-61-6666331  Mobile: +41-79-2457333

  Address: Clarastrasse 3, 4058 Basel, Switzerland

  E-Mail:  [email protected]

  Homepage: http://www.finkconsulting.com

  ---------------------------------------------------------------




  ICQ: 101946485 MSN: [email protected] AIM: smsrelay Skype: andreasfink

  Yahoo: finkconsulting SMS: +41792457333

  PGP9: 0714 DF2B A189 A760 6201  5CBD D040 3E71 4DAF 68BB
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.