http

command
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

README

Logs-lib HTTP Example

To run the example, simply type:

go run server.go

List all registered loggers and their current log level via HTTP GET:

curl localhost:8080/list

Modify log level remotely via HTTP POST:

curl -X PUT localhost:8080/set/{loggerName}/{logLevel}

Example of setting log level for custom and default loggers:

curl -X PUT localhost:8080/set/MyLogger/debug
curl -X PUT localhost:8080/set/defaultLogger/debug

Documentation

Overview

Example "http" demonstrates how to change the log level remotely via REST.

Jump to

Keyboard shortcuts

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