Skip to content

Commit 426ff4b

Browse files
refactor(audience-sdk): promote Log.Prefix to internal and add Log.WarnPrefix
Hoists the SDK stamp into named constants so the sample-app log adapter can strip it back off without hardcoding the same string. - Log.cs: promotes Prefix from private to internal and adds WarnPrefix following the "{Prefix} WARN:" shape Log.Warn emits. - Log.cs: Warn now reads its prefix from WarnPrefix instead of inlining the format.
1 parent 10ce826 commit 426ff4b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • src/Packages/Audience/Runtime/Utility

src/Packages/Audience/Runtime/Utility/Log.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ namespace Immutable.Audience
66
{
77
internal static class Log
88
{
9-
private const string Prefix = "[ImmutableAudience]";
9+
// Prepended to every SDK log line. Internal so the sample-app log adapter can strip it.
10+
internal const string Prefix = "[ImmutableAudience]";
11+
internal const string WarnPrefix = Prefix + " WARN:";
1012

1113
internal static bool Enabled { get; set; }
1214

@@ -20,7 +22,7 @@ internal static void Debug(string message)
2022
}
2123

2224
internal static void Warn(string message) =>
23-
Emit($"{Prefix} WARN: {message}");
25+
Emit($"{WarnPrefix} {message}");
2426

2527
private static void Emit(string line)
2628
{

0 commit comments

Comments
 (0)