Skip to content

Commit ab44632

Browse files
committed
Update to open source on github.com and npm
1 parent 89f0338 commit ab44632

File tree

7 files changed

+80
-36
lines changed

7 files changed

+80
-36
lines changed

.eslintrc

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
{
22
"rules": {
3-
"no-use-before-define": [ 0 ],
4-
"no-process-exit": [ 0 ],
5-
"quotes": [ 0 ],
6-
"no-unused-vars": [ 1 ],
7-
"no-shadow": [ 0 ],
8-
"curly": [ 0 ],
9-
"no-underscore-dangle": [ 0 ],
10-
"no-multi-spaces": [ 0 ],
11-
"no-trailing-spaces": [ 0 ],
12-
"no-mixed-spaces-and-tabs": [ 1 ],
13-
"camelcase": [ 0 ],
14-
"dot-notation": [ 0 ],
15-
"no-mixed-requires": [ 0 ],
16-
"no-undef": [ 2 ]
3+
"semi": [2, "always"],
4+
"indent": [2,4],
5+
"linebreak-style": [2,"unix"]
176
},
187
"env": {
19-
"node": true,
20-
"es6": true
21-
}
22-
}
8+
"es6": true,
9+
"node": true
10+
},
11+
"extends": "eslint:recommended"
12+
}

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: node_js
22
node_js:
3-
- '4'
4-
before_install:
5-
- echo -e "machine github.ibm.com\n login $CI_USER_TOKEN" >> ~/.netrc
3+
- '4'
4+
script:
5+
- node_modules/.bin/eslint .

DCO.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Developer's Certificate of Origin 1.1
2+
3+
By making a contribution to this project, I certify that:
4+
5+
(a) The contribution was created in whole or in part by me and I
6+
have the right to submit it under the open source license
7+
indicated in the file; or
8+
9+
(b) The contribution is based upon previous work that, to the best
10+
of my knowledge, is covered under an appropriate open source
11+
license and I have the right under that license to submit that
12+
work with modifications, whether created in whole or in part
13+
by me, under the same open source license (unless I am
14+
permitted to submit under a different license), as indicated
15+
in the file; or
16+
17+
(c) The contribution was provided directly to me by some other
18+
person who certified (a), (b) or (c) and I have not modified
19+
it.
20+
21+
(d) I understand and agree that this project and the contribution
22+
are public and that a record of the contribution (including all
23+
personal information I submit with it, including my sign-off) is
24+
maintained indefinitely and may be redistributed consistent with
25+
this project or the open source license(s) involved.
26+
27+
***
28+
And please confirm your certification to the above by adding the following
29+
line to your patch:
30+
31+
Signed-off-by: John Doe <john.doe@example.org>
32+
33+
using your real name (sorry, no pseudonyms or anonymous contributions).

LICENSE.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) IBM Corporation 2017. All Rights Reserved.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# node-log4js-logmet-appender
1+
# node-log4js-logmet-appender [![Build Status](https://travis-ci.org/IBM/node-log4js-logmet-appender.svg?branch=master)](https://travis-ci.org/IBM/node-log4js-logmet-appender)
22
Logmet appender for node-log4js
33

44
## Installation
55
```
6-
npm install git+https://github.ibm.com/org-ids/node-log4js-logmet-appender#<LatestTag> --save
6+
npm i log4js-logmet-appender --save
77
```
88

99
## Configuration
@@ -37,3 +37,15 @@ You may substitute `INFO` with your own level above (for ex: `WARN`, `ERROR`, et
3737

3838
## Pending work
3939
No automated tests currently
40+
41+
## License
42+
43+
[The MIT License (MIT)](LICENSE.txt)
44+
45+
## Contributing
46+
47+
Contributions are welcome via Pull Requests. Please submit your very first Pull Request against the [Developer's Certificate of Origin](DCO.txt), adding a line like the following to the end of the file... using your name and email address of course!
48+
49+
```
50+
Signed-off-by: John Doe <john.doe@example.org>
51+
```

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Licensed Materials - Property of IBM
3-
* (c) Copyright IBM Corporation 2016. All Rights Reserved.
3+
* (c) Copyright IBM Corporation 2016, 2017. All Rights Reserved.
44
*
55
* Note to U.S. Government Users Restricted Rights:
66
* Use, duplication or disclosure restricted by GSA ADP Schedule
@@ -21,7 +21,7 @@ module.exports = {
2121

2222
function sendData(level, options, tlsOpts, log) {
2323
var event = buildEvent(log, options);
24-
logmetConnection.producer.sendData(event, log.categoryName, options.space_id, function(error, status) {
24+
logmetConnection.producer.sendData(event, log.categoryName, options.space_id, function(/*error, status*/) {
2525
// message is dropped if an error is returned, errors already logged by logmet client
2626
});
2727
}
@@ -46,13 +46,13 @@ function appender(level, options, tlsOpts) {
4646
logmetConnection.producer = new logmet.LogmetProducer(tlsOpts.host, tlsOpts.port, options.space_id, options.logging_token, false, {bufferSize: logmetConnection.BUFFER_SIZE});
4747
logmetConnection.producer.connect(function(error, status) {
4848
if (error) {
49-
util.log('Logmet Appender: Connection with Logmet failed. ERROR: ' + error);
49+
util.log('Logmet Appender: Connection with Logmet failed. ERROR: ' + error);
5050
} else if (status.handshakeCompleted) {
5151
util.log('Logmet Appender: LogmetClient is ready to send data.');
5252
}
5353
});
5454
return sendData.bind(this, level, options, tlsOpts);
55-
};
55+
}
5656

5757
function configure(config) {
5858
if (process.env.log4js_logmet_enabled !== 'true') return function() {};
@@ -90,7 +90,7 @@ function configure(config) {
9090

9191
util.log('Logmet Appender configured');
9292
return appender(level, options, tlsOpts);
93-
};
93+
}
9494

9595
function shutdown(callback) {
9696
if (logmetConnection.producer) {

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
22
"name": "log4js-logmet-appender",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Logmet appender for node-log4js",
5-
"main": "index.js",
6-
"scripts": {
7-
"test": "node node_modules/eslint/bin/eslint ."
8-
},
5+
"author": "Herman Singh Badwal <hermanba@ca.ibm.com>",
6+
"license": "MIT",
97
"repository": {
108
"type": "git",
11-
"url": "https://github.ibm.com/org-ids/node-log4js-logmet-appender.git"
9+
"url": "https://github.com/IBM/node-log4js-logmet-appender.git"
1210
},
13-
"author": "Herman Singh Badwal <hermanba@ca.ibm.com>",
14-
"license": "IBM",
1511
"dependencies": {
1612
"log4js": "^0.6.35",
1713
"logmet-client": "^0.1.1"
1814
},
15+
"main": "index.js",
1916
"devDependencies": {
2017
"eslint": "^2.10.2"
18+
},
19+
"scripts": {
20+
"test": "node node_modules/eslint/bin/eslint ."
2121
}
2222
}

0 commit comments

Comments
 (0)