Brijesh's Git Server — argus-demo @ 0463e833db032e9940eaa0f69a9b425a1f08df44

main.go (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
package main

import (
	"log/slog"

	"github.com/wbrijesh/argus_client"
)

func main() {
	client := argus_client.NewClient(
		argus_client.ClientConfig{
			ApiKey:  "argus_jW35MW2m-dNdtSbhFVSrudlSIpQCA99apo_2mRvdbjU",
			BaseUrl: "http://localhost:8080",
		},
	)

	argusHandler := argus_client.NewArgusHandler(client)
	logger := slog.New(argusHandler)

	logger.Info("Info Log using slog handler")
	logger.Error("Error Log using slog handler")
	logger.Debug("Debug Log using slog handler")
	logger.Warn("Warn Log using slog handler")
}