The Core Technologies Blog

Professional Software for Windows Services / 24×7 Operation


AlwaysUp 13.3 Introduces Log File Rollover and Expands the use of Variables

AlwaysUp 13.3 is available now

AlwaysUp version 13.3 was released to all customers on April 16, 2022.

This update delivers a couple of significant improvements to help you run your programs as Windows Services — unattended and 24/7.

AlwaysUp accepts special variables in the “Arguments” and “Start in” fields

Do you run many instances of a single executable with AlwaysUp?

And does each application’s configuration follow a predictable format?

If so, you may be able to use special variables when defining your applications.

For example, let’s take the case of the Alpha Five web server. It’s common for customers to run multiple instances of Alpha in AlwaysUp, each with its own configuration.

In those situations, each entry in AlwaysUp will point to the same executable — A5ApplicationServer.exe. However, each instance will specify its own configuration file in the “Arguments” field.

Here is what it looks like when creating an instance of Alpha Five in AlwaysUp:

Alpha Five server configuration

Since the name of the configuration file (C:\AlphaFive\Server1-config.xml) is based on the entry’s name in AlwaysUp (Server1), we can use the $ALWAYSUP_NAME variable in the “Arguments” field instead:

Alpha Five server configuration using a variable

Using a variable like that reduces errors and saves a few keystrokes when duplicating the entry. And that can come in very handy when you have to create and manage many instances!

By the way, you can check out the full list of variables on page 78 of the AlwaysUp User’s Manual.

AlwaysUp can roll over log files when capturing your console application’s output

If you’re running a console application as a Windows Service with AlwaysUp, you may already know about the option to capture output to a file. That setting is available on the Extras tab.

In previous releases, the only option to limit the file’s size was by trimming. When the file grew larger than the given threshold, AlwaysUp would discard the oldest 25% of the file to make room for new entries. As such, there was no way retain all console output while limiting the file’s size.

To address that shortcoming, AlwaysUp now supports rollover when the file gets too large. When the rollover option is enabled, AlwaysUp will copy a too-large log file to a name suffixed with the current date and restart capture with an empty file.

For example, let’s say you’re logging to a file named “console-output.log” and limiting the size to 10 MB. And on April 20, 2022, the file exceeds the threshold. In response, AlwaysUp will:

  1. Copy the file to “console-output_2022-04-20.log”, to preserve all entries recorded so far;

  2. Zero out “console-output.log” and start writing new entries there.

Note that if there are many rollovers in a single day, AlwaysUp will add numeric suffix to produce a unique file name. That may result in files named “console-output_2022-04-20_01.log” or “console-output_2022-04-20_02.log” in the situation above.

You can activate the rollover option on the Extras tab. Check the Capture output… and Automatically… boxes and choose rollover from the selector:

AlwaysUp: Log file rollover

Other fixes & improvements

As usual, please review the release notes for the full list of features, fixes and improvements included in this release.

Upgrading to AlwaysUp 13.3

If you purchased AlwaysUp version 12 (after March 2020), you can upgrade to any version 13 for free. Simply download and install “over the top” to preserve your existing applications and all settings. Your registration code will continue to work as well.

If you bought AlwaysUp version 11 or earlier (before March 2020), you will need to upgrade to use version 13. Consequently, please purchase upgrades here — at a 50% discount.

Please see the upgrade policy for full details.

Enjoy!

Posted in AlwaysUp | Tagged , , , , , , | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *