Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Usage Information to Readme #35

Merged
merged 6 commits into from
Jul 9, 2019
Merged

Add Usage Information to Readme #35

merged 6 commits into from
Jul 9, 2019

Conversation

ernestii
Copy link
Contributor

@ernestii ernestii commented Jul 4, 2019

Add the following information to readme:

Usage

Command Description
logdna register [email] Register a new LogDNA account
logdna ssologin Log in to a LogDNA via single sign-on
logdna login [email] Log in to LogDNA
logdna tail [options] [query] Live tail with optional filtering. Options include -h, -a, -l, -t to filter by hosts, apps, levels or tags respectively. Run logdna tail --help to learn more.
logdna switch If your login has access to more than one account, this command allows you to switch between them
logdna search [options] [query] Basic search with optional filtering. Run logdna search --help for options.
logdna info Show current logged in user info
logdna update Update the CLI to the latest version

Examples

# Register
$ logdna register [email protected]
$ logdna register [email protected] b7c0487cfa5fa7327c9a166c6418598d # use this if you were assigned an Ingestion Key

# Login
$ logdna login [email protected]

# Tail
$ logdna tail '("timed out" OR "connection refused") -request'
$ logdna tail -a access.log 500
$ logdna tail -l error,warn

# Search
$ logdna search "logdna cli" -a logdna.log -t tag1,tag2 -n 300
$ logdna search "logdna" --from 1541100040931 --to 1541102940000

# Other
$ logdna info
$ logdna update

# Switch organization
$ logdna switch

> 1: ACME (active)
> 2: Strickland Propane
> Choose account [1-2]:

@ernestii ernestii requested a review from smusali July 4, 2019 16:24
@smusali smusali requested a review from dchai76 July 4, 2019 16:25
@smusali smusali assigned smusali and ernestii and unassigned smusali Jul 4, 2019
Copy link
Contributor

@smusali smusali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In terms of the validity of the content, all is good but I think @dchai76 is much better at reviewing documentation-related changes - content-wise.

README.md Outdated Show resolved Hide resolved
Copy link

@dchai76 dchai76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! I love clis.

README.md Outdated

| Command | Description |
| - | - |
| `logdna register [email] [key]` | Register a new LogDNA account. `[key]` is optional and will autogenerate. |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think key could use better explanation. Like, reading this I don't know what it's for and why you would ever specify it. Maybe call it [ingestion_key] to start and say "If you are registering for a new account and don't yet have an ingestion key, this command will create one for you."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we removed support for the key param some time ago. I'll remove it from here. You can check commit 0c9781a70 on ldapi.

README.md Outdated
| Command | Description |
| - | - |
| `logdna register [email] [key]` | Register a new LogDNA account. `[key]` is optional and will autogenerate. |
| `logdna ssologin` | Login to a LogDNA user account via single sign-on. |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's say Log in to LogDNA via single sign-on

README.md Outdated
| - | - |
| `logdna register [email] [key]` | Register a new LogDNA account. `[key]` is optional and will autogenerate. |
| `logdna ssologin` | Login to a LogDNA user account via single sign-on. |
| `logdna login [email]` | Login to a LogDNA user account. |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log in to LogDNA

README.md Outdated
| `logdna register [email] [key]` | Register a new LogDNA account. `[key]` is optional and will autogenerate. |
| `logdna ssologin` | Login to a LogDNA user account via single sign-on. |
| `logdna login [email]` | Login to a LogDNA user account. |
| `logdna tail [options] [query]` | Live tail with optional filtering. Options include `-h`, `-a`, `-l`, `-t` to filter by hosts, apps, levels or tags respectively. Run `logdna tail -h` to learn more. |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of confusing - are we re-using -h for both hosts filtering and help instructions? Maybe help should be --help?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be --help

README.md Outdated
| `logdna ssologin` | Login to a LogDNA user account via single sign-on. |
| `logdna login [email]` | Login to a LogDNA user account. |
| `logdna tail [options] [query]` | Live tail with optional filtering. Options include `-h`, `-a`, `-l`, `-t` to filter by hosts, apps, levels or tags respectively. Run `logdna tail -h` to learn more. |
| `logdna switch` | Switch between multiple accounts if your login has access to more than one. |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If your login has access to more than one account, this command allows you to switch between them.

README.md Outdated
| `logdna login [email]` | Login to a LogDNA user account. |
| `logdna tail [options] [query]` | Live tail with optional filtering. Options include `-h`, `-a`, `-l`, `-t` to filter by hosts, apps, levels or tags respectively. Run `logdna tail -h` to learn more. |
| `logdna switch` | Switch between multiple accounts if your login has access to more than one. |
| `logdna search [options] [query]` | Limited search functionality with optional filtering. See `logdna search --help`. |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Basic search with optional filtering. Run logdna search --help for options."

README.md Outdated
| `logdna switch` | Switch between multiple accounts if your login has access to more than one. |
| `logdna search [options] [query]` | Limited search functionality with optional filtering. See `logdna search --help`. |
| `logdna info` | Show current logged in user info. |
| `logdna update` | Update CLI to latest version. |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Update the CLI to the latest version."

README.md Show resolved Hide resolved
@smusali smusali self-requested a review July 4, 2019 21:36
Copy link

@dchai76 dchai76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 small suggestions, otherwise looks good, let's merge.

index.js Outdated
@@ -20,13 +20,12 @@ process.title = 'logdna';
program._name = 'logdna';
program
.version(pkg.version, '-v, --version')
.usage('[commands] [options]\n\n This CLI duplicates useful functionality of the LogDNA web app.')
// .description('This CLI duplicates useful functionality of the LogDNA web app.')
.usage('[commands] [options]\n\nThe LogDNA CLI allows you to signup for a new account and tail your servers right from the command line.')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use "sign up" not "signup", and "tail your logs" instead of "tail your servers"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ernestii ernestii merged commit f29d71f into master Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants