nullstone-io / nullstone

Nullstone is a customizable developer platform launched on your cloud accounts.
https://nullstone.io
MIT License
39 stars 1 forks source link

C385 Logs #16

Closed BSick7 closed 3 years ago

BSick7 commented 3 years ago

This PR adds nullstone logs CLI command.

$ nullstone logs -h
NAME:
    logs - Emit application logs

USAGE:
   nullstone logs <app-name> <env-name> [options]

OPTIONS:
   --stack value  The stack name where the app resides.
       This is only required if multiple apps have the same 'app-name'.
   --start-time value  Emit log events that occur after the specified start-time.
       This is a golang duration relative to the time the command is issued.
                        Examples: '5s' (5 seconds ago), '1m' (1 minute ago), '24h' (24 hours ago) (default: 0s)
   --end-time value  Emit log events that occur before the specified end-time.
       This is a golang duration relative to the time the command is issued.
                        Examples: '5s' (5 seconds ago), '1m' (1 minute ago), '24h' (24 hours ago) (default: 0s)
   --interval value  Set --interval to a golang duration to control how often to pull new log events.
By default, this is set to 1s.
This will do nothing unless --tail is set. (default: 0s)
   --tail  Set tail to watch log events and emit as they are reported.
Use --interval to control how often to query log events.
This is off by default, command will exit as soon as current log events are emitted.