Skip to content
This repository was archived by the owner on Apr 21, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

This file documents all notable changes in `LogDNA Node.js Code Library`. The release numbering uses [semantic versioning](http://semver.org).

## Next Release [MAJOR]
- Breaking Change: Add support for custom properties by adding `shimProperties` option when creating an logger. In order to continue to see fields `appOverride`, `logSourceCRN`, and `saveServiceCopy` in the message, need to add those properties in `shimProperties`.

## v3.3.3 - September 20, 2019
- Add User Agent to the Request Header

Expand Down
24 changes: 0 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ options.tags = ['logging', 'nodejs', 'logdna'];
// or:
options.tags = 'logging,nodejs,logdna';

// Customized options that will be applied to message during `.log` call
options.shimProperties = ['prop1', 'prop2', 'prop3'];

// Create multiple loggers with different options
var logger = Logger.createLogger(apikey, options);

Expand Down Expand Up @@ -131,27 +128,6 @@ logger.log('My Sample Log Line', opts);
```
You will see the outputs in your LogDNA dashboard.

If customized options is needed in the message, `shimProperties` can be used:
```javascript
const Logger = require('logdna');
const options = {
hostname: myHostname,
ip: ipAddress,
mac: macAddress,
app: appName,
env: envName,
shimProperties: ['prop1', 'prop2', 'prop3']
};
const logger = Logger.createLogger(apikey, options);

logger.log('My Sample Log Line', {
prop1: true,
prop2: 'good',
prop4: false
});
```
You will see `prop1` and `prop2` be logged, but neither of `prop3` and `prop4` are logged.

## API

### createLogger(key, [options])
Expand Down