Replacing python: in syslog log messages

Discussion in 'Python' started by Brian Donovan, Sep 5, 2003.

  1. Does anyone know a way to replace the python: in syslog messages?

    As an example:

    Currently I have:

    Sep 5 16:57:03 typhoon python: jeeves_backup starting

    I would like:

    Sep 5 16:57:03 typhoon jeeves_backup: starting

    Thanks

    Brian
     
    Brian Donovan, Sep 5, 2003
    #1
    1. Advertising

  2. Brian Donovan

    Jp Calderone Guest

    On Fri, Sep 05, 2003 at 09:01:41PM +0000, Brian Donovan wrote:
    > Does anyone know a way to replace the python: in syslog messages?
    >
    > As an example:
    >
    > Currently I have:
    >
    > Sep 5 16:57:03 typhoon python: jeeves_backup starting
    >
    > I would like:
    >
    > Sep 5 16:57:03 typhoon jeeves_backup: starting
    >


    Very roughly: at startup, if os.path.basename(sys.argv[0]) == "python",
    os.execl() sys.executable with [sys.argv[1]] + sys.argv[1:] as the argument
    list.


    > Thanks
    >
    > Brian
    >
    > --
    > http://mail.python.org/mailman/listinfo/python-list


    --
    "Minerals are inexhaustible and will never be depleted. A stream of
    investment creates additions to proved reserves, a very large in-ground
    inventory, constantly renewed as it is extracted... How much was in the
    ground at the start and how much will be left at the end are unknown and
    irrelevant." -- Morry Adelman, World Renowned Economist
     
    Jp Calderone, Sep 6, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Albretch
    Replies:
    0
    Views:
    963
    Albretch
    Jul 14, 2004
  2. Replies:
    2
    Views:
    6,211
    Chris Uppal
    Jun 20, 2006
  3. Stuart Kendrick
    Replies:
    0
    Views:
    185
    Stuart Kendrick
    Feb 26, 2004
  4. leroy isaac
    Replies:
    1
    Views:
    524
    James Willmore
    Oct 29, 2004
  5. Bad Dog
    Replies:
    0
    Views:
    257
    Bad Dog
    Aug 9, 2007
Loading...

Share This Page