19.12. Registering Event Log on Windows

|19.12. Registering Event Log on Windows|                  |                                      |                  |                            |
|:-------------------------------------:|------------------|--------------------------------------|------------------|----------------------------|
|       [Prev](ssh-tunnels.html)        |[Up](runtime.html)|Chapter 19. Server Setup and Operation|[Home](index.html)| [Next](runtime-config.html)|

---

## 19.12. Registering Event Log on Windows

[]()

 To register a Windows event log library with the operating system, issue this command:

```
regsvr32 pgsql_library_directory/pgevent.dll

```

 This creates registry entries used by the event viewer, under the default event source named `PostgreSQL`.

 To specify a different event source name (see [event\_source](runtime-config-logging.html#GUC-EVENT-SOURCE)), use the `/n` and `/i` options:

```
regsvr32 /n /i:event_source_name pgsql_library_directory/pgevent.dll

```

 To unregister the event log library from the operating system, issue this command:

```
regsvr32 /u [/i:event_source_name] pgsql_library_directory/pgevent.dll

```

### Note

 To enable event logging in the database server, modify [log\_destination](runtime-config-logging.html#GUC-LOG-DESTINATION) to include `eventlog` in `postgresql.conf`.

---

|            [Prev](ssh-tunnels.html)             |[Up](runtime.html)|   [Next](runtime-config.html)   |
|:------------------------------------------------|:----------------:|--------------------------------:|
|19.11. Secure TCP/IP Connections with SSH Tunnels|[Home](index.html)| Chapter 20. Server Configuration|

 // \<![CDATA[ \<-- For SVG support if ('WebSocket' in window) { (function() { function refreshCSS() { var sheets = [].slice.call(document.getElementsByTagName("link")); var head = document.getElementsByTagName("head")[0]; for (var i = 0; i \< sheets.length; ++i) { var elem = sheets[i]; head.removeChild(elem); var rel = elem.rel; if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") { var url = elem.href.replace(/(&|\\?)\_cacheOverride=\\d+/, ''); elem.href = url + (url.indexOf('?') \>= 0 ? '&' : '?') + '\_cacheOverride=' + (new Date().valueOf()); } head.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function(msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; console.log('Live reload enabled.'); })(); } // ]]\>