Skip to content

Commit 8561c78

Browse files
author
machibuse
committed
Standardize log message prefixes for error and warning outputs across TypeMapper components
1 parent 70c4d85 commit 8561c78

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

Source/Porticle.Grpc.TypeMapper/ClassVisitor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ public class ClassVisitor : CSharpSyntaxRewriter
2323

2424
if (propertyVisitor.NeedGuidConverter) node = node.AddMembers(ClassFromSource(ListWrappers.RepeatedFieldGuidWrapper));
2525

26-
Console.WriteLine("Visit Methods for " + propertyVisitor.ReplaceProps.Count + " props");
2726
var methodVisitor = new MethodVisitor(propertyVisitor.ReplaceProps);
2827
node = (ClassDeclarationSyntax)methodVisitor.Visit(node);
2928

Source/Porticle.Grpc.TypeMapper/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
// Akzeptiert den Dateipfad als Argument
88
if (args.Length != 1)
99
{
10-
Console.WriteLine("Error: Expected exactly 1 arg but got " + args.Length);
11-
foreach (var arg in args) Console.WriteLine("Error: arg[..] '" + arg + "'");
10+
Console.WriteLine("[Error] Expected exactly 1 arg but got " + args.Length);
11+
foreach (var arg in args) Console.WriteLine("[Error] arg[..] '" + arg + "'");
1212
return;
1313
}
1414

1515
var basename = Path.GetFileNameWithoutExtension(args[0]);
1616

1717
if (string.IsNullOrWhiteSpace(basename))
1818
{
19-
Console.WriteLine("Warning: Nothing to preprocess - no filename given");
19+
Console.WriteLine("[Warning] Nothing to preprocess - no filename given");
2020
return;
2121
}
2222

Source/Porticle.Grpc.TypeMapper/PropertyVisitor.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,11 @@ public class PropertyVisitor : CSharpSyntaxRewriter
6363

6464
var isNullable = matchingField.CheckNotNull("Matching field not found").ToFullString().Contains("ForClassWrapper<string>");
6565

66-
Console.WriteLine("isNullable " + isNullable + " " + property.Identifier.ToFullString());
67-
6866
if (property.GetLeadingTrivia().ToFullString().Contains("[GrpcGuid]"))
6967
{
7068
if (isNullable)
7169
{
72-
Console.WriteLine("Error: Nullable Guid is not supported for repeated fields because protoc don't allow null for lists");
70+
Console.WriteLine("[Error] Nullable Guid is not supported for repeated fields because protoc don't allow null for lists");
7371
}
7472
else
7573
{
@@ -87,7 +85,7 @@ public class PropertyVisitor : CSharpSyntaxRewriter
8785

8886
if (property.GetLeadingTrivia().ToFullString().Contains("[NullableString]"))
8987
if (isNullable)
90-
Console.WriteLine("Error: Nullable string is not supported for repeated fields because protoc don't allow null for lists");
88+
Console.WriteLine("[Error] Nullable string is not supported for repeated fields because protoc don't allow null for lists");
9189

9290
return null;
9391
}

0 commit comments

Comments
 (0)