Rui Lopes is sharing code with you
Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.
Don't show this againIisZmqLoggingModule overview
Recent commits See more »
| Author | Revision | Comments | Message | Labels | Date |
|---|---|---|---|---|---|
|
|
dbe4d3653e3f |
Encode log messages with protobuf. |
|
||
|
|
b4fff9fdb5d3 |
Add VERSIONINFO. |
|
||
|
|
e360dec09274 |
Add initial cut. |
|
# Install Install with: %windir%\system32\inetsrv\appcmd.exe install module /name:ZmqLoggingModule "/image:%CD%\ZmqLoggingModule\x64\Release\ZmqLoggingModule.dll" NB this modifies %windir%\system32\inetsrv\config\applicationhost.config NB make sure the ZmqLoggingModule.dll can be read by IIS. NB you can later uninstall with: %windir%\system32\inetsrv\appcmd.exe uninstall module ZmqLoggingModule Start the sample applicaton that displays the logging messages: python tail-zmq-logging-module-messages.py Access an IIS hosted site, eg: http://localhost You should see something like (wrapped for readability) on the sample application output: waiting for ZmqLoggingModule messages... time: "2011-12-18T09:50:25Z" processId: 5204 method: "GET" url: "http://test.local:80/" httpVersion: "1.1" localAddress: "127.0.2.1" localPort: 80 remoteAddress: "127.0.0.1" remotePort: 4387 siteId: 2 applicationId: "/LM/W3SVC/2/ROOT" status: 200 subStatus: 0 requestHeaders { name: "Cache-Control" value: "max-age=0" } requestHeaders { name: "Connection" value: "keep-alive" } requestHeaders { name: "Accept" value: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" } requestHeaders { name: "Accept-Charset" value: "ISO-8859-1,utf-8;q=0.7,*;q=0.3" } requestHeaders { name: "Accept-Encoding" value: "gzip,deflate,sdch" } requestHeaders { name: "Accept-Language" value: "en-US,en;q=0.8,pt;q=0.6" } requestHeaders { name: "Host" value: "test.local" } requestHeaders { name: "If-Modified-Since" value: "Sat, 05 Nov 2011 14:41:49 GMT" } requestHeaders { name: "If-None-Match" value: "\"d8e0becc99bcc1:0\"" } requestHeaders { name: "UserAgent" value: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7" } responseHeaders { name: "Cache-Control" value: "private" } responseHeaders { name: "Server" value: "Microsoft-IIS/7.5" } responseHeaders { name: "X-AspNet-Version" value: "4.0.30319" } # Building Compile the protbuf file LoggingMessage.proto into the C++ code LoggingMessage.pb.h and .cc with: cd ZmqLoggingModule/ZmqLoggingModule ../../tools/protoc/protoc --cpp_out=. LoggingMessage.proto Download the protobuf source, and install the python module (pure-python is enough for testing...): ../../tools/protoc/protoc --python_out=../.. LoggingMessage.proto cd ../../tools/protobuf-2.4.1/python python setup.py install cd ../../.. python tail-zmq-logging-module-messages.py -- copyright Rui Lopes (ruilopes.com) licensed under LGPLv3. see https://bitbucket.org/rgl/iiszmqloggingmodule