@certicraft/logging
v1.1.10
Published
This package is used to log and debug data to Google Cloud Platform
Downloads
226
Readme
@certicraft/logging
Description
Our @certicraft/logging
package is used to log information to the cloud logging service. The current API is not very user friendly and we would like to improve it.
Example Usage
import { CloudLogger } from '@certicraft/logging';
CloudLogger().setLabels({
companyId: '123',
userId: '456'
});
CloudLogger().info(
`ensureContainerDocumentsExist snapshotVersion: ${snapshotVersion}`
);
CloudLogger().error(
'Error while connecting redis'
);
const label = 'time based logging';
CloudLogger().time(label)
CloudLogger().timeLog(label, 'intermediary logging 1')
CloudLogger().timeLog(label, 'intermediary logging 2')
CloudLogger().timeEnd(label)
Deploying to NPM
npm login
npm publish --access public
Troubleshooting
If you're having problems with building the project, you can delete the file tsconfig.tsbuildinfo
and run npm run build
again.