Git Product home page Git Product logo

jocasta's Introduction

jocasta

Release Build Status BCH compliancecodecov

Small utiliy that save stdin and stderr of the provided commands to log file with log rotation

Usage

jocasta [-c configurationFileWithoutExtension] command arg1 arg2 ... arg

Configuration file can be in JSON, TOML or YAML. By default jocasta will lookup for .jocasta.json, .jocasta.toml or .jocasta.yaml in the current directory. If the -c option is provided, the provided path must be provided without the extension, jocasta will try all compatible extension.

Configuration file format

The configuration file can contains six keys with default value. The value can be overrided by a environment variable.

Key in config file Environment variable default value
out_file JOCASTA_OUT_FILE /tmp/jocasta_{CommandName}_stdout.log
out_maxsize JOCASTA_OUT_MAXSIZE 0
out_backups JOCASTA_OUT_BACKUPS 0
err_file JOCASTA_ERR_FILE /tmp/jocasta_{CommandName}_stderr.log
err_maxsize JOCASTA_ERR_MAXSIZE 0
err_backups JOCASTA_ERR_BACKUPS 0

All keys are prefixed by "out" or "err" that concerns STDOUT and STDERR of the command.

out_file and err_file

Path to the STDOUT and STDERR log file. The path can contains "{{.App}}" that will be replaced by the command name.

out_maxsize and err_maxsize

Approximative maximum size of the STDOUT and STDERR log file. The value can be suffixed by kb, mb, gb. The rotation will occurs at the first carriage return after this size is reached to avoid to split a line.

out_backups and err_backups

Number of kept rotation files of the STDOUT and STDERR log file. The rotated files will have the name precised by out_file or err_file suffixed by the file number.

jocasta's People

Contributors

marema31 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.