azlog

command module
v0.0.0-...-8835833 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

README


{ "image": "direktiv/azlog", "desc": "Writes a log line to Azure Log Analytics Workspace." }

AzureLog

Writes a log line to Azure Log Analytics Workspace.

Direktiv

An example workflow of using the container on Direktiv.

id: log-to-azure
functions:
- id: log
  image: direktiv/azlog:v1
description: "Log a message to Azure Analytics Workspace"
states:
- id: log-hello
  type: action
  action:
    function: log
    input: jq(.)

Input

The input needed to run the above workflow properly is the following:

input:
  message: "Hello"
  "workspace-id": jq(.secrets.WORKSPACE_ID)
  key: jq(.secrets.WORKSPACE_KEY)
  type: "direktiv"
}

NOTE: The type field is used so you can query based from it in the Analytics Workspace.

Output

If the request is successful. Not output will be returned and the logs should appeared if queried on Azure.

Error

In the case that an error is encountered, it will present in the following format:

{
    "errorCode": "com.azlog.error",
    "errorMsg": "Something went wrong"
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL