10000 Correct Emit Log Direct · bsumgit/rabbitmq-tutorials@56e7678 · GitHub
[go: up one dir, main page]

Skip to content

Commit 56e7678

Browse files
author
Brian Stajkowski
committed
Correct Emit Log Direct
Sys.argv will always be greater than 1, but in the instance where the severity is supplied it would be greather than 2.
1 parent 407af0e commit 56e7678

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/emit_log_direct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
channel.exchange_declare(exchange='direct_logs',
1010
exchange_type='direct')
1111

12-
severity = sys.argv[1] if len(sys.argv) > 1 else 'info'
12+
severity = sys.argv[1] if len(sys.argv) > 2 else 'info'
1313
message = ' '.join(sys.argv[2:]) or 'Hello World!'
1414
channel.basic_publish(exchange='direct_logs',
1515
routing_key=severity,

0 commit comments

Comments
 (0)
0