Skip to content

Logdy new version announcement: v0.3

I'm happy to announce that I keep adding new feature to Logdy. This is just a beggining of new additions based on use cases and feedback coming from new users.

Let's see what new in v0.3

Bind socket mode to multiple ports

So far you could only bind to a single port with Logdy

bash
$ logdy socket 8123

However, this could be problematic if you would be sending log lines from multiple locations to the same port. To overcome that, you can now list multiple ports separated by comma (,).

bash
$ logdy socket 8123 8124 8125

Logdy will bind to all of these ports and will listen to incoming lines. In addition a new property has been added in the Message type (see origin field in reference).

ts
type Message = {
    // ...
    /**
     * Specifies the origin of the message
     */
    origin?: {
        /**
         * Origin port number if the message was produced 
         */
        port: string
    }
}

That means you can use this field in the middlewares as well as columns, which in turn fully enable you to identify exactly the source of each log line produced when listening on multiple files.

New 'forward' mode

forward is a new mode in Logdy. You can now pipe log lines to a specific port directly with Logdy.

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

Summary

These two changes combined together open a very interesting use case of pumping easily log lines from multiple files to Logdy at the same time. Example:

bash
# setup a listening instance
$ logdy socket 8123 8124 8125

# follow new lines in 3 distinct files and forward them to specific ports
$ tail -f log1.log | logdy forward 8123
$ tail -f log2.log | logdy forward 8124
$ tail -f log3.log | logdy forward 8125

You can see origin port in the drawer

Origin port is available in the code