1.0.6 • Published 10 months ago

@camatsoft/tracelog v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Description

Simplify Your Logging with CamatSoft.TraceLog

CamatSoft.TraceLog is a lightweight and extensible tracing solution designed to streamline logging in your .NET projects. It offers:

  • Simple configuration : Get started with just a few lines of code.
  • Multi-destination support : Log to the console, files, or third-party services like Serilog or Elastic Stack.
  • Robust extensibility : Tailor the package to your specific needs with custom hook systems.
  • Optimized performance : Minimal impact on your application’s performance.

Adopt CamatSoft.TraceLog and take full control of your logging, de facto.

TraceLog SDK for TypeScript by CamatSoft

IntegrationsNPM VersionDocumentation
CamatSoft.TraceLognpmnpmdocumentation
CamatSoft.TraceLog.Contractnpmnpmdocumentation

DSN

Register on CamatSoft.TraceLog

DSN Test

https://pRGLY9uhyKPu4b44s3Pe6a6pk46NBbRz4b2E2RMpb648h8DR2N7K7qsb97XFYM2r@o20241101.tracelog.camatsoft.com/2024111101
.

Constructor

CamatsoftTraceLog.Sdk.init()
CamatsoftTraceLog.Sdk.init(dsn:string)
CamatsoftTraceLog.Sdk.init(dsn:string, callbackfn?: (scope: Scope) => void)
CamatsoftTraceLog.Sdk.init(options:TraceLogOptions)
CamatsoftTraceLog.Sdk.init(callbackfn?: (options: TraceLogOptions) => void)

Methods

NameParamsDescription
async captureExecption(ex: Exception, callbackfn?: (scope: Scope) => void): Promise< CaptureExceptionResponseDto>ex is Exception, scope is Action contains a scopeCapture exception
async captureMessage(message: string, level?: DiagnosticLevel, callbackfn?: (scope: Scope) => void): Promise< CaptureMessageResponseDto>message is a message log, level is a level type of log, scope is Action contains a scopeCaptureMessage

Exemples

in .ts (EntryPoint) :

import * as CamatsoftTracelog from '@camatsoft/tracelog'

CamatsoftTracelog.Sdk.init(options => { 
    options.dsn = "https://azerty@o0000.tracelog.camatsoft.com/999999";
    options.configureScope(scope =>
    {
        scope.SetTag("MyTag", "MyValue");
    });
});

in another file .ts :

import * as CamatsoftTracelog from '@camatsoft/tracelog'

try
{
    throw "MyException";
}
catch (ex)
{
    let captureResponseDto = CamatsoftTracelog.Sdk.captureExecption(new CamatsoftTracelog.Exception({ message: ex }), scope =>
    {
        scope.SetTag("UserName", "Georges");
    });
}

Release Notes

v1.0.4

Fix bug setDiagnosticLevel in scope

v1.0.3

Add dependencies Add setDiagnosticLevel in scope

v1.0.2

Add export class

v1.0.1

Add ReadMe

v1.0.0

Create solution

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago