MCPcopy Create free account
hub / github.com/apache/cloudberry / write_eventlog

Function write_eventlog

src/bin/pg_ctl/pg_ctl.c:183–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181
182#ifdef WIN32
183static void
184write_eventlog(int level, const char *line)
185{
186 static HANDLE evtHandle = INVALID_HANDLE_VALUE;
187
188 if (silent_mode && level == EVENTLOG_INFORMATION_TYPE)
189 return;
190
191 if (evtHandle == INVALID_HANDLE_VALUE)
192 {
193 evtHandle = RegisterEventSource(NULL,
194 event_source ? event_source : DEFAULT_EVENT_SOURCE);
195 if (evtHandle == NULL)
196 {
197 evtHandle = INVALID_HANDLE_VALUE;
198 return;
199 }
200 }
201
202 ReportEvent(evtHandle,
203 level,
204 0,
205 0, /* All events are Id 0 */
206 NULL,
207 1,
208 0,
209 &line,
210 NULL);
211}
212#endif
213
214/*

Callers 2

write_stderrFunction · 0.70
pgwin32_ServiceMainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected