Skip to content

Commit

Permalink
Merge pull request #1 from steve-scalyr/patch-1
Browse files Browse the repository at this point in the history
Tweaks to comments and message text
  • Loading branch information
imron committed Sep 5, 2015
2 parents 5dae6d5 + 93ecba8 commit 72dde39
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scalyr
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,11 @@ def commandTail( parser ):
#get a list of matches that we haven't seen yet
new_matches = [match for match in response['matches'] if get_match_unique_id( match ) not in previous_matches]

#if we have a full list, then some logging output has been dropped
#so let the user know
#if the "not in previous_matches" test didn't find any duplicates, that means there have been
#so many new log events that our new query didn't overlap with the previous query. Therefore, we'll
#have missed some of the intervening messages.
if not first and len( new_matches ) >= max_matches:
print "[WARN] Too much logging output. Some log lines have been dropped"
print "[WARN] Too many messages for tail to keep up; some messages are not being shown."

#print out any new matches, and add the ids to the list of matches we have already seen
for match in new_matches:
Expand All @@ -350,7 +351,7 @@ def commandTail( parser ):

current_time = time.time()
first = False
print "----\nLive tail expired.\n Please contact [email protected] if you require a longer live tail\n"
print "----\nTo minimize server load, live tail expires after 10 minutes. If this is bothersome, please let us know at [email protected].\n"

# Implement the "scalyr numeric-query" command.
def commandNumericQuery(parser):
Expand Down

0 comments on commit 72dde39

Please sign in to comment.