Replacing python: in syslog log messages

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian Donovan

    Replacing python: in syslog log messages

    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

  • Jp Calderone

    #2
    Re: Replacing python: in syslog log messages

    On Fri, Sep 05, 2003 at 09:01:41PM +0000, Brian Donovan wrote:[color=blue]
    > 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
    >[/color]

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

    [color=blue]
    > Thanks
    >
    > Brian
    >
    > --
    > http://mail.python.org/mailman/listinfo/python-list[/color]

    --
    "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

    Comment

    Working...