1.0.39 • Published 3 years ago

@mojoio/logdna v1.0.39

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

@mojoio/logdna

an unoffical package for the logdna api

Availabililty and Links

Status for master

Status CategoryStatus Badge
GitLab Pipelinespipeline status
GitLab Pipline Test Coveragecoverage report
npmnpm downloads per month
SnykKnown Vulnerabilities
TypeScript SupportTypeScript
node Supportnode
Code StyleCode Style
PackagePhobia (total standalone install weight)PackagePhobia
PackagePhobia (package size on registry)PackagePhobia
BundlePhobia (total size when bundled)BundlePhobia
Platform supportSupports Windows 10 Supports Mac OS X

Usage

Use TypeScript for best in class instellisense.

This package is an unofficial package for the logdna.com service. It comes with the following features:

  • aggregate logs that require the same uri query parameters and sends them as bundle. This ensures the correct order of logs within logdna.
  • resend logs that failed to send.
  • support smartlog messages and the smartlog ecosystem
  • support giraffe.cloud ecosystem
import { ILogPackage } from '@pushrocks/smartlog-interfaces';

import { LogdnaAccount, LogdnaMessage } from '@mojoio/logdna';

// lets create a logDnaAccount
const logDnaAccount = new LogdnaAccount(process.env.LOGDNA_APIKEY);

// lets create a smartlog message (smartlog normally takes care of creating those objects)
const smartlogPackage: ILogPackage = {
  timestamp: Date.now(),
  type: 'log',
  level: 'info',
  context: {
    company: 'Lossless GmbH',
    companyunit: 'lossless.cloud',
    containerName: 'ci-mojoio-logdna',
    environment: 'test',
    runtime: 'node',
    zone: 'shipzone',
  },
  message: 'this is an awesome log message sent by the tapbundle test',
};

const logdnaMessage = LogdnaMessage.fromSmartLogPackage(smartlogPackage);

logDnaAccount.sendLogdnaMessage(logdnaMessage);

// alternatively simply send the smartlogPackage
// creation of the LogdnaMessage is done for you
logDnaAccount.sendSmartlogPackage(smartlogPackage);

// most of the above funtions return promises should you want to wait for a log to be fully sent

Contribution

We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can contribute one time or contribute monthly. :)

For further information read the linked docs at the top of this readme.

MIT licensed | © Lossless GmbH | By using this npm module you agree to our privacy policy

repo-footer

1.0.39

3 years ago

1.0.34

4 years ago

1.0.33

4 years ago

1.0.32

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago