logerr-system
v1.0.16
Published
Sistema simples para log de erros
Downloads
5
Maintainers
Readme
logerr-system
- TypeScript 4.2
- ESLint with some initial rules recommendation
- Jest for fast unit testing and code coverage
- Type definitions for Node.js and Jest
- Prettier to enforce consistent code style
- NPM scripts for common operations: test, release
- Simple example of TypeScript code and unit test
- .editorconfig for consistent file format
Getting Started
Make sure to be used with the latest Active LTS release version of Node.js.
yarn add logerr-system
npm install logerr-system
Init Supabase
Creating an instance You can create a new instance of logerr with a custom config.
LogErr.ts
import { initSupabase } from "logerr-system";
export const { captureException } = initSupabase({
baseUrl,
apiKey,
authorization,
project,
});
DTO database
{
"id": "int8 | string | number",
"error": "string | varchar",
"objError": "JSON | string | text",
"project": "string | varchar",
"created_at": "string | timestamptz",
}
Usage Supabase
import { captureException } from "./LogErr"; // Select LogErr.ts
try{
} catch (err){
captureException("message err", err);
}
Init Api
Creating an instance You can create a new instance of logerr with a custom config.
LogErr.ts
import { initApi } from "logerr-system";
export const { captureException } = initApi({
baseUrl,
authorization,
project,
});
Usage Api
import { captureException } from "./LogErr"; // Select LogErr.ts
try{
} catch (err){
captureException("message err", err);
}
Download latest release
License
Licensed under the MIT. See the LICENSE file for details.