@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

Package Sidebar

Install

npm i @1xtr/yc-log-client

Weekly Downloads

2

Version

1.1.1

License

Apache-2.0

Unpacked Size

113 kB

Total Files

30

Last publish

Collaborators

  • 1xtr