The LogDNA CLI allows you to sign up for a new account and tail your logs right from the command line.
Download the LogDNA CLI installer for Mac.
Alternatively install via brew cask:
brew cask update brew cask install logdna-cli
To install on Windows, using chocolatey:
choco install logdna
sudo wget -qO /tmp/logdna-cli.deb http://repo.logdna.com/linux/logdna-cli.deb && sudo dpkg -i /tmp/logdna-cli.deb
sudo wget -qO /tmp/logdna-cli.rpm http://repo.logdna.com/linux/logdna-cli.rpm && sudo rpm -ivh /tmp/logdna-cli.rpm
Follow these quick instructions to run the LogDNA CLI from source:
git clone https://github.com/logdna/logdna-cli.git cd logdna-cli npm install # help node index.js --help # login using one of commands below node index.js login node index.js ssologin
To build the cli, ensure you have nexe installed. This packages the LogDNA CLI as a native executable with the node.js runtime bundled. This will automatically build the runtime from source.
Ensure you have a native C++ compiler installed.
Ensure you have Visual Studio 2015 or newer installed.
Ensure you have Xcode 7 or newer installed.
Creating the binary
To start the build:
This takes a bit of time and will output a binary at
.\logdna.exe if on Windows). For the initial build, majority of time will be spent building node.js. Subsequent builds will be much faster as node.js would've already been built.
sudo gem install fpm sudo yum install rpm-build createrepo sudo yum --enablerepo=epel install dpkg-devel dpkg-dev grunt linux
This will output the
yum files to the root of the repo.
Install chocolatey. Then do:
This will output the chocolatey package under
gem install fpm grunt mac
This will output the
pkg file to the root of the repo. Signing will likely fail since we typically sign it with our Apple Developer key, but the package should still be usable, just unsigned.
||Register a new LogDNA account|
||Log in to a LogDNA via single sign-on|
||Log in to LogDNA|
||Live tail with optional filtering. Options include
||If your login has access to more than one account, this command allows you to switch between them|
||Basic search with optional filtering. Run
||Show current logged in user info|
||Update the CLI to the latest version|
# Register $ logdna register email@example.com # Login $ logdna login firstname.lastname@example.org # 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]:
Contributions are always welcome. See the contributing guide to learn how you can help.