@1xtr/yc-log-client

1.1.1 • Public • Published

yc-log-client

How to use in Winston custom transport

import { YCLogClient } from '@1xtr/yc-log-client'

// in transport constructor
this.YCLogger = new YCLogClient()

// in transport log method need initialization before use
if (!this.YCLogger.ready) {
  await this.YCLogger.init()
}

this.YCLogger.write(writeRequest)

Work only on VM in cloud

Token gets from metadata by request to:

http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/token

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.120latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.120
1.1.01
1.0.61

Package Sidebar

Install

npm i @1xtr/yc-log-client

Weekly Downloads

22

Version

1.1.1

License

Apache-2.0

Unpacked Size

113 kB

Total Files

30

Last publish

Collaborators

  • 1xtr