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.
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)
npm login
npm publish --access public
If you're having problems with building the project, you can delete the file tsconfig.tsbuildinfo
and run npm run build
again.