55 references to OutLn
Microsoft.Gen.Logging (55)
Emission\Emitter.cs (4)
37OutLn($"namespace {lt.Namespace}"); 54OutLn(parentTypes[i]); 58OutLn($"partial {lt.Keyword} {lt.Name}"); 119OutLn($"private static readonly Microsoft.Extensions.Compliance.Classification.DataClassification {fieldName} = new {classificationAttr}().Classification;");
Emission\Emitter.Method.cs (48)
36OutLn($"/// <summary>"); 40OutLn($"/// Logs \"{EscapeMessageStringForXmlDocumentation(lm.Message)}\"{lvl}."); 44OutLn($"/// Emits a structured log entry{lvl}."); 47OutLn($"/// </summary>"); 61OutLn($"if ({logger} == null)"); 63OutLn("return;"); 70OutLn($"if (!{logger}.IsEnabled({level}))"); 72OutLn("return;"); 79OutLn($"var {stateName} = {LoggerMessageHelperType}.ThreadLocalState;"); 83OutLn($"{logger}.Log("); 86OutLn($"{level},"); 90OutLn($"new({lm.EventId}, {eventName}),"); 94OutLn($"new({GetNonRandomizedHashCode(eventName)}, {eventName}),"); 97OutLn($"{stateName},"); 98OutLn($"{exceptionArg},"); 102OutLn($"[{GeneratorUtilities.GeneratedCodeAttribute}] static string ({lambdaStateName}, {exceptionLambdaName}) =>"); 119OutLn($@"#if NET"); 120OutLn($@"return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, ${s});"); 121OutLn($@"#else"); 122OutLn($@"return global::System.FormattableString.Invariant(${s});"); 123OutLn($@"#endif"); 127OutLn($@"return string.Empty;"); 131OutLn($@"return {EscapeMessageString(lm.Message)};"); 138OutLn($"{stateName}.Clear();"); 319OutLn($"_ = {stateName}.ReserveTagSpace({numReservedUnclassifiedTags});"); 341OutLn($"{stateName}.TagArray[{--count}] = new({key}, {value});"); 364OutLn($"{stateName}.TagArray[{--count}] = new(\"{propName}\", {value});"); 372OutLn($"{stateName}.TagArray[{--count}] = new(\"{{OriginalFormat}}\", {EscapeMessageString(lm.Message)});"); 379OutLn($"_ = {stateName}.ReserveClassifiedTagSpace({numReservedClassifiedTags});"); 392OutLn($"{stateName}.ClassifiedTagArray[{--count}] = new({key}, {value}, {classification});"); 413OutLn($"{stateName}.ClassifiedTagArray[{--count}] = new(\"{propName}\", {value}, {classification});"); 440OutLn($"var {tmpVarName} = {value};"); 441OutLn($"if ({tmpVarName} != null)"); 443OutLn($"{stateName}.AddClassifiedTag(\"{propName}\", {tmpVarName}, {classification});"); 450OutLn($"{stateName}.AddClassifiedTag(\"{propName}\", {value}, {classification});"); 471OutLn($"if ({accessExpression} != null)"); 473OutLn($"{stateName}.AddTag(\"{propName}\", {value});"); 481OutLn($"var {tmpVarName} = {value};"); 482OutLn($"if ({tmpVarName} != null)"); 484OutLn($"{stateName}.AddTag(\"{propName}\", {tmpVarName});"); 492OutLn($"{stateName}.AddTag(\"{propName}\", {value});"); 502OutLn($"{stateName}.TagNamePrefix = string.Empty;"); 506OutLn($"{stateName}.TagNamePrefix = nameof({p.ParameterNameWithAtIfNeeded});"); 509OutLn($"{p.TagProvider!.ContainingType}.{p.TagProvider.MethodName}({stateName}, {p.ParameterNameWithAtIfNeeded});"); 532OutLn($"var {atSign}{p.ParameterName} = {lambdaStateName}.TagArray[{index}].Value ?? {Null};"); 536OutLn($"var {atSign}{p.ParameterName} = {lambdaStateName}.TagArray[{index}].Value;"); 561OutLn($"var {atSign}{p.ParameterName} = {lambdaStateName}.RedactedTagArray[{index}].Value ?? {Null};"); 565OutLn($"var {atSign}{p.ParameterName} = {lambdaStateName}.RedactedTagArray[{index}].Value;");
src\Generators\Shared\EmitterBase.cs (3)
39OutLn("{"); 46OutLn("}"); 103protected void OutGeneratedCodeAttribute() => OutLn($"[{GeneratorUtilities.GeneratedCodeAttribute}]");