@Override
    public Event createEvent(final String typeId,
                             final String description,
                             final Purpose purpose,
                             final EventAction eventAction) {
        // Get the current request.
        final HttpServletRequest request = getRequest();

        // Get device.
        final Device device = getDevice(request);

        // Get client.
        final Device client = getClient(request);

        return Event.builder()
                .withEventTime(EventTime.builder()
                        .withTimeCreated(new Date())
                        .build())
                .withEventSource(EventSource.builder()
                        .withSystem(SystemDetail.builder()
                                .withName(SYSTEM)
                                .withEnvironment(ENVIRONMENT)
                                .withVersion(buildInfoProvider.get().getBuildVersion())
                                .build())
                        .withGenerator(GENERATOR)
                        .withDevice(device)
                        .withClient(client)
                        .withUser(getUser())
                        .withRunAs(getRunAsUser())
                        .build())
                .withEventDetail(EventDetail.builder()
                        .withTypeId(typeId)
                        .withDescription(description)
                        .withPurpose(mergePurposes(PurposeUtil.create(currentActivity.getActivity()), purpose))
                        .withEventAction(eventAction)
                        .build())
                .build();
    }
Logger - should not be used for event logs
stroom-event-logging/stroom-event-logging-impl/src/main/java/stroom/event/logging/impl/StroomEventLoggingServiceImpl.java