Code Monkey home page Code Monkey logo

mlogger's Introduction

mlogger

A simple utility that logs different sources to syslog

It is based on bsdutils logger, which is shipped with many linux distros, Ubuntu being one.

It has been patched for:

  • Log lines greater than 1k. Currently set to 64k. The limit can be raised even further by changing the MAX_LINE constant. You may also have to patch syslog.h for your kernel, this was not required on Ubuntu 12.04
  • Indented line continuation. If enabled any line that begins with a tab or a space following a line that did was not indented will be added to the previous line(s). There is a configurable timeout to keep the detection delay to a minimum. A few milliseconds seems to work well here
  • When logging to a UDP server (-n/--server), the size limit is still 400 characters. This limitation is inherit in UDP.
  • When logging to a Unix socket (-u/--socket), the size limit is also limited by the kernel maximum size which is commonly around 120KB ( see /proc/sys/net/core/wmem_default ).

Usage

mlogger [options] [message]

Options:
 -d, --udp              use UDP (TCP is default)
 -i, --id               log the process ID too
 -f, --file <file>      log the contents of this file
 -h, --help             display this help text and exit
 -n, --server <name>    write to this remote syslog server
 -P, --port <number>    use this UDP port
 -p, --priority <prio>  mark given message with this priority
 -s, --stderr           output message to standard error as well
 -t, --tag <tag>        mark every line with this tag
 -u, --socket <socket>  write to this Unix socket
 -I, --indent <ms>      Will consider intended lines continuation of the previous line, within the timeout
                        specified in milliseconds
 -V, --version          output version information and exit

or

man mlogger

Building

To build mlogger

make

mlogger's People

Contributors

nbrownus avatar agordon avatar njh avatar

Watchers

James Cloos 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.