Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

zicht/z-plugin-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Logging for Z

With this plugin you can very easily trigger curl REST request to be done for any type of task.

The plugin is built in such a way that you only need to configure the names of the task you want to log, and how.

It assumes the remote is able to handle POST requests as json data, but you can configure any custom log command.

Example:

log:
    projectname: "My project"
    tasks: ['my_task']
    endpoints:
        - endpoint: http://example.org
          format: ''

This would do a POST request with curl to the specified endpoint before and after the task. Tasks can be considered succesful if both the pre and the post have been trigger.

echo 'curl -s -XPOST http://example.org -d '\'(data omitted for legibility')\'' > /dev/null' | /bin/bash -e
echo 'echo "This is the task"' | /bin/bash -e
echo 'curl -s -XPOST http://example.org -d '\''(data omitted for legibility)'\'' > /dev/null' | /bin/bash -e

Maintainers

About

Utility - Z plugin 'log' - easily configure HTTP messages for logging

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages