예제 #1
0
 /// <summary>
 /// Adds fact about ES call into log
 /// </summary>
 public static DslExpression AndFactIs(this DslExpression logger, IApiCallDetails apiCallDetails)
 {
     return(logger.AndFactIs("es-call-details",
                             apiCallDetails != null
             ? ApiCallDumper.ApiCallToDump(apiCallDetails)
             : "[null]"));
 }
예제 #2
0
파일: DslLogger.cs 프로젝트: mylab-log/ctx
        private DslExpression ApplyExtensions(DslExpression expr)
        {
            DslExpression resultExpr = expr;

            var extensions = _serviceProvider
                             .GetServices(typeof(ILogContextExtension))
                             .Cast <ILogContextExtension>()
                             .ToArray();

            foreach (var extension in extensions)
            {
                resultExpr = extension.Apply(resultExpr);
            }

            return(resultExpr);
        }
예제 #3
0
 public DslExpression Apply(DslExpression dslExpression)
 {
     return(dslExpression.AndLabel("bar"));
 }