Replacing python: in syslog log messages

B

Brian Donovan

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
 
J

Jp Calderone

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

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top