def logs(environment, opts):
container = '<STR_LIT>'<EOL>if opts['<STR_LIT>']:<EOL><INDENT>container = '<STR_LIT>'<EOL><DEDENT>if opts['<STR_LIT>']:<EOL><INDENT>container = '<STR_LIT>'<EOL><DEDENT>if opts['<STR_LIT>']:<EOL><INDENT>container = '<STR_LIT>'<EOL><DEDENT>tail = opts['<STR_LIT>']<EOL>if tail != '<STR_LIT:all>':<EOL><INDENT>tail = int(tail)<EOL><DEDENT>l = environment.logs(container, tail, opts['<STR_LIT>'],<EOL>opts['<STR_LIT>'])<EOL>if not opts['<STR_LIT>']:<EOL><INDENT>print(l)<EOL>return<EOL><DEDENT>try:<EOL><INDENT>for message in l:<EOL><INDENT>write(message)<EOL><DEDENT><DEDENT>except KeyboardInterrupt:<EOL><INDENT>print()<EOL><DEDENT>
Display or follow container logs

Usage:
  datacats logs [--postgres | --solr | --datapusher] [-s NAME] [-tr] [--tail=LINES] [ENVIRONMENT]
  datacats logs -f [--postgres | --solr | --datapusher] [-s NAME] [-r] [ENVIRONMENT]

Options:
  --datapusher       Show logs for datapusher instead of web logs
  --postgres         Show postgres database logs instead of web logs
  -f --follow        Follow logs instead of exiting immediately
  --solr             Show solr search logs instead of web logs
  -t --timestamps    Add timestamps to log lines
  -s --site=NAME     Specify a site for logs if needed [default: primary]
  --tail=LINES       Number of lines to show [default: all]

ENVIRONMENT may be an environment name or a path to an environment directory.
Default: '.'