EnglishFrenchSpanish

OnWorks favicon

clog - Online in the Cloud

Run clog in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command clog that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


clog - colorized log tail

SYNOPSIS


clog [-h|--help] [-v|--version] [-d|--date] [-t|--time] [-f|--file <rc>] [ <section> ... ]

DESCRIPTION


Clog is a filter command, which means it copies its input to its output. But if lines in
the input match certain patterns, actions are taken. These are called rules.

The rules are defined in ~/.clogrc as regular expressions, and the actions are specified,
to colorize either the line or matching pattern, or perhaps to suppress the line.

If --date is specified, the current date, in the form YYYY-MM-DD is prepended to all
lines.

If --time is specified, the current time, in the form HH:MM:SS is prepended to all lines.

If --file is specified, an alternate configuration rc file may be specified. Default is
to ~/.clogrc

One or more section arguments may be specified. If none are provided, 'default' is
assumed. A section corresponds to a rule set defined in ~/.clogrc. and allows the use of
one .clogrc file to serve multiple different uses of clog. If more than one section is
specified, the rules sets are combined, in the sequence found.

CONFIGURATION FILE AND OVERRIDE OPTIONS


Clog reads its configuration from a file in the user's home directory: ~/.clogrc.

The format of the rules is:

<section> rule /<pattern>/ --> <color> <action>
<section> rule "<pattern>" --> <color> <action>

If the pattern is surrounded by / characters, it is interpreted as a regular expression.
If the pattern is surrounded by " characters, it is interpreted as a string fragment.

The section is simply a way to allow multiple rules sets, so that one .clogrc file can
serve multiple uses. The pattern may be any supported Standard C Library regular
expression. Action must be one of 'line', 'match', 'suppress' or 'blank'.

Note that there is a default section, called 'default'. Putting rules in the default
section means that no section need be specified on the command line.

Any color can be used, in both the 16- and 256-color space. Some examples are:

bold
underline
bold blue
underline on green
black on white
bold red on bright white
rgb200 on grey4

Instead of coloring the whole line, specifying 'match' instead will only color the parts
of the line that match.

EXAMPLE Rulesets


Here is an example ~/.clogrc file.

# Standard syslog entries.
default rule /warn|debug/ --> yellow line
default rule /error|severe/ --> red line
default rule /critical/ --> bold red line
default rule /critical/ --> blank
default rule /ignore/ --> suppress

# Apache access.log status codes
apache rule / 2[0-9][0-9] / --> green match
apache rule / 3[0-9][0-9] / --> yellow match
apache rule / 4[0-9][0-9] / --> red match
apache rule / 5[0-9][0-9] / --> bold red match

CREDITS & COPYRIGHTS


Copyright (C) 2006 - 2013 P. Beckingham, F. Hernandez.
Copyright (C) 2006 - 2013 Goteborg Bit Factory.

Clog is distributed under the MIT license. See http://www.opensource.org/licenses/mit-
license.php for more information.

Use clog online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    formkiq-core
    formkiq-core
    FormKiQ Core is an Open Source Document
    Management System (DMS), available to
    run as a headless software or with a
    web-based client, deployed to your
    Amazon We...
    Download formkiq-core
  • 2
    Blackfriday
    Blackfriday
    Blackfriday is a Markdown processor
    implemented in Go. It is paranoid about
    its input (so you can safely feed it
    user-supplied data), it is fast, it
    supports c...
    Download Blackfriday
  • 3
    QNAP NAS GPL Source
    QNAP NAS GPL Source
    GPL source for QNAP Turbo NAS.
    Audience: Developers. User interface:
    Web-based. Programming Language: C,
    Java. Categories:System, Storage,
    Operating System Ker...
    Download QNAP NAS GPL Source
  • 4
    deep-clean
    deep-clean
    A Kotlin script that nukes all build
    caches from Gradle/Android projects.
    Useful when Gradle or the IDE let you
    down. The script has been tested on
    macOS, but ...
    Download deep-clean
  • 5
    Eclipse Checkstyle Plug-in
    Eclipse Checkstyle Plug-in
    The Eclipse Checkstyle plug-in
    integrates the Checkstyle Java code
    auditor into the Eclipse IDE. The
    plug-in provides real-time feedback to
    the user about viol...
    Download Eclipse Checkstyle Plug-in
  • 6
    AstrOrzPlayer
    AstrOrzPlayer
    AstrOrz Player is a free media player
    software, part based on WMP and VLC. The
    player is in a minimalist style, with
    more than ten theme colors, and can also
    b...
    Download AstrOrzPlayer
  • More »

Linux commands

  • 1
    a2query
    a2query
    a2query - retrieve runtime
    configuration from a local Apache 2 HTTP
    server ...
    Run a2query
  • 2
    a2x
    a2x
    a2x - A toolchain manager for AsciiDoc
    (converts Asciidoc text files to other
    file formats) ...
    Run a2x
  • 3
    cooktime
    cooktime
    cooktime - set file times ...
    Run cooktime
  • 4
    cook_bom
    cook_bom
    cook_bom - bill of materials ...
    Run cook_bom
  • 5
    gbackground
    gbackground
    gbackground - interval-based gnome
    background changer SYNTAX: gbackground
    DESCRIPTION: This program allows to
    change periodically the gnome background
    in inter...
    Run gbackground
  • 6
    gbacorr
    gbacorr
    gbacorr - Compute
    auto/cross-correlation coefficients ...
    Run gbacorr
  • More »

Ad