Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
0310c03ecb | |||
9e8efc7dea | |||
00e1b8d862 | |||
c5cedb027d | |||
f075f7f23a | |||
809df76043 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mojoio/logdna",
|
"name": "@mojoio/logdna",
|
||||||
"version": "1.0.11",
|
"version": "1.0.14",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mojoio/logdna",
|
"name": "@mojoio/logdna",
|
||||||
"version": "1.0.11",
|
"version": "1.0.14",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "anunoffical package for the logdna api",
|
"description": "anunoffical package for the logdna api",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -22,7 +22,7 @@ tap.test('should create a standard log message', async () => {
|
|||||||
containerName: 'ci-mojoio-logdna',
|
containerName: 'ci-mojoio-logdna',
|
||||||
environment: 'test',
|
environment: 'test',
|
||||||
runtime: 'node',
|
runtime: 'node',
|
||||||
zone: 'ship.zone'
|
zone: 'shipzone'
|
||||||
},
|
},
|
||||||
message: 'this is an awesome log message :)'
|
message: 'this is an awesome log message :)'
|
||||||
});
|
});
|
||||||
|
@ -70,7 +70,7 @@ export class LogdnaMessage {
|
|||||||
env: smartlogPackageArg.context.environment,
|
env: smartlogPackageArg.context.environment,
|
||||||
hostname: smartlogPackageArg.context.zone,
|
hostname: smartlogPackageArg.context.zone,
|
||||||
level: smartlogPackageArg.level,
|
level: smartlogPackageArg.level,
|
||||||
app: smartlogPackageArg.context.zone,
|
app: smartlogPackageArg.context.containerName,
|
||||||
tags: (() => {
|
tags: (() => {
|
||||||
const tagArray: string[] = [];
|
const tagArray: string[] = [];
|
||||||
tagArray.push(smartlogPackageArg.context.company);
|
tagArray.push(smartlogPackageArg.context.company);
|
||||||
|
@ -71,17 +71,17 @@ export class LogdnaAccount {
|
|||||||
/**
|
/**
|
||||||
* convenience function for smartlog
|
* convenience function for smartlog
|
||||||
*/
|
*/
|
||||||
async sendSmartlogPackage (smartlogPackageArg: ILogPackage) {
|
public async sendSmartlogPackage (smartlogPackageArg: ILogPackage) {
|
||||||
this.sendLogDnaMessage(LogdnaMessage.fromSmartLogPackage(smartlogPackageArg));
|
this.sendLogDnaMessage(LogdnaMessage.fromSmartLogPackage(smartlogPackageArg));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns a smartlog compatible log destination
|
* returns a smartlog compatible log destination
|
||||||
*/
|
*/
|
||||||
async getSmartlogDestination(): Promise<ILogDestination> {
|
public get smartlogDestination (): ILogDestination {
|
||||||
return {
|
return {
|
||||||
handleLog: (logPackageArg) => {
|
handleLog: (logPackageArg) => {
|
||||||
this.sendSmartlogPackage(logPackageArg)
|
this.sendSmartlogPackage(logPackageArg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user