Giter VIP home page Giter VIP logo

log-cli-plugin's Introduction

Streaming logs from the CLI

This plugin adds a CLI command to watch Jenkins system log messages in real time. This is useful if you wish to monitor activity from a shell. You can get detailed logs from a particular component.

For detailed usage information, go to https://<jenkins>/cli/command/tail-log after installation.

Streaming detailed logs to standard error

You can also choose to send system logs to the Jenkins controller’s standard error stream. While Jenkins sends INFO and above by default, this plugin allows you to configure more detailed messages from particular components of interest.

From the GUI, check Fine logging to standard error in system configuration. Using JCasC (configuration-as-code), use the following format:

unclassified:
  stderrLog:
    targets:
    - name: io.jenkins.plugins.whatever
      level: FINE

As a bonus, this will stream messages in the selected components printed by agents as well, which are otherwise very tricky to collect.

Viewing the resulting logs is a separate matter. On Kubernetes, you can use for example kubectl logs -f $podname, or try kubectl krew install tail or kubectl krew install stern for richer options.

log-cli-plugin's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar github-actions[bot] avatar jetersen avatar jglick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jglick jetersen

log-cli-plugin's Issues

`StderrLogConfig.apply` should not block waiting on agents

Noticed in a support bundle slow-requests/:

12273msec elapsed in Handling POST /…/manage/configSubmit from … / waiting for …
    [email protected]/java.lang.Object.wait(Native Method)
    hudson.remoting.Request.call(Request.java:177)
    hudson.remoting.Channel.call(Channel.java:999)
    org.jenkinsci.plugins.log_cli.StderrLogConfig.apply(StderrLogConfig.java:142)
    org.jenkinsci.plugins.log_cli.StderrLogConfig.setTargets(StderrLogConfig.java:126)
    org.jenkinsci.plugins.log_cli.StderrLogConfig.configure(StderrLogConfig.java:131)
    jenkins.model.Jenkins.configureDescriptor(Jenkins.java:4120)
    jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:4084)

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.