Contributions are always welcome! Be sure to follow the github workflow when contributing to this project:
- Create an issue, or comment on an issue to indicate what you are working on. This avoids work duplication.
- Fork the repository and clone to your local machine
- You should already be on the default branch
master- if not, check it out (
git checkout master)
- Create a new branch for your feature/fix
git checkout -b my-new-feature)
- Write your feature/fix
- Stage the changed files for a commit (
git add .)
- Commit your files with a useful commit message (example) (
- Push your new branch to your GitHub Fork (
git push origin my-new-feature)
- Visit this repository in GitHub and create a Pull Request.
To run various tasks you'll need to have grunt-cli installed.
Running the Tests
All tests are written in the
To run all the tests & validations (including
eslint for code style) do:
To just run the validations do:
This is the same command that is ran on within the CI system on pull-request.
Each file has a
debug variable defined such as:
var debug = require('debug')('logdna:index');
To enable logs for the index.js file just set the environment variable
# Unix/Linux export DEBUG=logdna:index # windows set DEBUG=logdna:index
debug log messages for the index.js file.
You can also enable one or more modules to log by using
# Unix/Linux export DEBUG=* # windows set DEBUG=*
You can use this to control which parts of the agent logs it's debug output.
To build the agent, ensure you have nexe installed (
npm install -g firstname.lastname@example.org). This packages the LogDNA agent 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-agent.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.