We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 506af39 commit ac6c7e4Copy full SHA for ac6c7e4
dotnet/EmitLog.cs
@@ -12,11 +12,15 @@ public static void Main(string[] args)
12
{
13
channel.ExchangeDeclare("logs", "fanout");
14
15
- var message = (args.Length > 0) ? string.Join(" ", args)
16
- : "info: Hello World!";
+ var message = GetMessage(args);
17
var body = Encoding.UTF8.GetBytes(message);
18
channel.BasicPublish("logs", "", null, body);
19
Console.WriteLine(" [x] Sent {0}", message);
20
}
21
+
22
+ private static string GetMessage(string[] args)
23
+ {
24
+ return ((args.Length > 0) ? string.Join(" ", args) : "info: Hello World!");
25
+ }
26
0 commit comments