outputmanager

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package `outputmanager` provides facilities for controlling the logging library as well as capabilities to post-process API execution results (such as store results as a JSON file)

Index

Constants

This section is empty.

Variables

View Source
var LogBuff bytes.Buffer

LogBuff is used to append various log statements into memory. If the user toggles the `Output (-o)` option, then the contents of LogBuff is pushed into a JSON file

Functions

func ConfigureZeroLog

func ConfigureZeroLog(level string)

ConfigureZeroLog provides global log level setting. By default, ZeroLog uses the DEBUG level; however, the function makes the desired level more explicit

func ResponseToJSON added in v1.3.0

func ResponseToJSON(resp httpie.ExResponse) (*gabs.Container, error)

func WriteJSONOutput

func WriteJSONOutput(resp httpie.ExResponse, targetPath string)

WriteJSONOutput is primarily built for helping with Extension/Integration building with external tools. Extension writers may simply call `l2 -n -o /tmp/lama2.json ...` to invoke WriteJSONOutput; the generated json file contains three keys: `logs`, `headers`, `body`

Types

This section is empty.

Jump to

Keyboard shortcuts

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