1.1.1 • Published 1 year ago

@1xtr/yc-log-client v1.1.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

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