Skip to content

Command modes

This page describes the modes in which you can run Logdy binary. In all of the modes, Logdy will start a webserver that will serve the web UI. You can check more options in the CLI chapter.

stdin (default)

bash
$ tail -f file.log | logdy

Accepts the input on stdin or coming from a specified command to run.

bash
$ logdy stdin [command]

In this mode, Logdy will start a command specified in the [command] argument and intercept its STDOUT/STDERR. This could be any shell command that's producing the aforementioned output. Example

bash
$ logdy stdin 'npm run dev'

TIP

This command mode is particularly useful if you have a process that is strictly producing logs

socket

bash
$ logdy socket <port1> [<port2> ... <portN>]

Sets up a port(s) to listen for incoming line messages.

bash
$ logdy socket 8233

You can setup multiple ports, separated by a space.

bash
$ logdy socket 8233 8234 8235

In another terminal session

bash
$ tail -f file.log | nc 8233 # all stdout will be sent to port 8233

Each message line will be marked with the origin port for easier identification where each line was produced.

forward

bash
$ logdy forward <port>

Forwards lines from stdin to a port (the port should be one of the ones specified in $ logdy socket). Example usage

bash
$ tail -f file.log | logdy forward 8123

TIP

Use this command together with $ logdy socket command ran in a separate terminal. See announcement for examples. This is basically a substitute to netcat command.

follow

bash
$ logdy follow <file1> [<file2> ... <fileN>]

Watches the file(s) for new lines.

bash
$ logdy follow file.log

You can provide multiple files as well as relative or absolute paths.

bash
$ logdy follow file.log /var/log/file.log ../file1.log

By default following will ONLY push new lines to the buffer. If you would like to load the whole content of each file then use --full-read option.

bash
$ logdy follow --full-read file.log file2.log

In the above example, the contents of both files will be read and pushed to the buffer.

Each line sent to the UI will be marked with the origin file field for easier identification where each line was produced.

demo

bash
$ logdy demo [number]

Starts a demo mode, random logs will be produced, the [number] defines a number of messages produced per second

TIP

This is a great mode if you would like to try out Logdy and play with it, locally without connecting it to any logs source.