can you use an api to write information to the event log?