Alex Costantino

Information Technology DevelopmentI.T. Development

🇬🇷️ 🇮🇹 EN

LogWrapper




For some projects, I track the hours I work.
To do this, I created a simple online tool.

The problem is that sometimes I get lazy to log them, especially after long hours of work.
And in the end, I lose track of when I actually stopped.

So I thought

Why not automate it?

Essentially, I just needed to keep a log every time I lock my screen.
I looked to see if the system could do it automatically, but I didn’t find anything useful.
Maybe with more digging, I could have found something, but certainly not with the simplicity I wanted.

So I decided to create a small script that does exactly that.

Then I thought

Why not generalize it? Maybe it will be useful to others too.

And that’s how I ended up creating LogWrapper.

How it works

With LogWrapper, you run a command and log whatever you want:

  • You define where the log will be saved
  • What message to write
  • Then you just run your command

Now you might ask

OK, but how did you make it log every time you lock the screen?

Very simple: you create an alias of the command that includes LogWrapper before it. :D
So every time you run the command, it passes through LogWrapper.

If you think it might be useful and want to try it yourself, follow the instructions here:
LogWrapper on GitHub

Thanks for your time, and see you in the next article.