Skip to content

Commit

Permalink
fail gracefully if you try and run paasta logs without scribe existing
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob-Johnson committed Nov 19, 2015
1 parent 7cbf494 commit 6095720
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions paasta_tools/paasta_cli/cmds/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import sys

import isodate

try:
from scribereader import scribereader
from scribereader.scribereader import StreamTailerSetupError
Expand Down Expand Up @@ -509,6 +510,12 @@ def tail_paasta_logs(service, levels, components, clusters, raw_mode=False):
def paasta_logs(args):
"""Print the logs for as Paasta service.
:param args: argparse.Namespace obj created from sys.args by paasta_cli"""
if 'scribereader' not in vars():
sys.exit(
"Unfortunately, `paasta logs` is unavailable without Scribe."
" We're working to support alternative logging backends in PaaSTA:"
" follow https://github.com/Yelp/paasta/issues/64 for updates."
)
service = figure_out_service_name(args)

if args.clusters is None:
Expand Down

0 comments on commit 6095720

Please sign in to comment.