private static MessageContent BuildLogMessageContent(string message, IMoeGrain moeGrain, string tag, ulong errorCode, string errorCodeMessage, TraceEntry traceEntry, Exception exception, Dictionary <string, object> payload)
        {
            if (moeGrain != null)
            {
                if (payload == null)
                {
                    payload = new Dictionary <string, object>();
                }

                payload.AddIfNotExist("GrainIdentityString", moeGrain.IdentityString);

                payload.AddIfNotExist("GrainRuntimeIdentity", moeGrain.RuntimeIdentity);
            }

            return(BuildLogMessageContent(message, tag, errorCode, errorCodeMessage, traceEntry, exception, payload));
        }
Exemple #2
0
        private static LogEntry BuildLogEntry(int level, string message, IMoeGrain moeGrain, string tag = "None", ulong errorCode = 0UL, string errorCodeMessage = "", TraceEntry traceEntry = null, Exception exception = null, Dictionary <string, object> payload = null)
        {
            if (moeGrain != null)
            {
                if (payload == null)
                {
                    payload = new Dictionary <string, object>();
                }

                payload.AddIfNotExist("GrainIdentityString", moeGrain.IdentityString);

                payload.AddIfNotExist("GrainRuntimeIdentity", moeGrain.RuntimeIdentity);
            }

            return(BuildLogEntry(level, message, tag, errorCode, errorCodeMessage, traceEntry, exception, payload));
        }