Forum Discussion

AngelaIp's avatar
AngelaIp
Ideator I
6 years ago
Solved

Is it possible to use the System Event Log for logging custom events?

Hi community, the system event log by default is configured so we can track successful and failed login attempts. I wonder if we can also use the log to track other events of interest? E.g. I hav...
  • Hi Angela,

    I had to look at the source code for this function, but it looks like the supported list of event types are hard-coded. The hard-coded list does contain all of the standard server events (onAfterAdd, onBeforePromote, etc.) as well as the system events (SuccessfulLogin, FailedLogin, Logout). While you can't use custom events, if the method you're interested in is called in one of the standard server events, it might make sense use that event in place of a custom MethodFailed event. Something like:

    CCO.SystemEventLogger.CreateSystemLogRecord("OnAfterAdd","Method_doSomething",inn.getUserID(),"Method xy failed, value z invalid" );

    Note that these event names are case-sensitive and written in PascalCase (capital first letter and capital letters on every distinct word).

    Chris


    Christopher Gillis

    Aras Labs Software Engineer