Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79241 > unrolled thread
| Started by | "Arulnambi Nandagoban" <a.nandagoban@traxens.com> |
|---|---|
| First post | 2014-10-17 11:59 +0200 |
| Last post | 2014-10-17 19:15 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
windows log to event viewer "Arulnambi Nandagoban" <a.nandagoban@traxens.com> - 2014-10-17 11:59 +0200
Re: windows log to event viewer Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2014-10-17 19:15 +0200
| From | "Arulnambi Nandagoban" <a.nandagoban@traxens.com> |
|---|---|
| Date | 2014-10-17 11:59 +0200 |
| Subject | windows log to event viewer |
| Message-ID | <mailman.14943.1413540061.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
Hello, I am trying to run a tcp server as a windows service. The project also includes an application layer protocol somewhat like CoAP and few soap calls to data base. There is some moment the code enter into exception during a soap method call. This exception is not viewed in Windows event viewer. Should I specify somewhere to log these exception in windows event viewer. Or, give me some suggestion how to log some Critical message in windows log. -- nambi
[toc] | [next] | [standalone]
| From | Irmen de Jong <irmen.NOSPAM@xs4all.nl> |
|---|---|
| Date | 2014-10-17 19:15 +0200 |
| Message-ID | <54414eab$0$2901$e4fe514c@news.xs4all.nl> |
| In reply to | #79241 |
On 17-10-2014 11:59, Arulnambi Nandagoban wrote: > Hello, > > > > I am trying to run a tcp server as a windows service. > > The project also includes an application layer protocol somewhat like CoAP and few soap > calls to data base. > > There is some moment the code enter into exception during a soap method call. This > exception is not viewed in > > Windows event viewer. Should I specify somewhere to log these exception in windows event > viewer. Or, give me some suggestion how to log some > > Critical message in windows log. > What I would try is to catch the exception and log it, including a message, to the NT Event log. You should be able to do this using the NTEventLogHandler from Python's standard logging module, see: https://docs.python.org/3.4/library/logging.handlers.html#logging.handlers.NTEventLogHandler Irmen
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web