Motion - Slightly Improved Thread Creation Logging

Slightly Improved Thread Creation Logging

Description of Patch

This patch will make Motion's output a little bit more descriptive as it starts up.

As the normal "Thread is from /usr/local/etc/thread1.conf" messages get sent to Syslog, I got tired of trying to figure out which thread was which. This patch at least tells you which conf is which thread # when it gets created.

Basically it will alter the following message

Thread is from /usr/local/etc/thread1.conf

into the following message

Thread 1 is from /usr/local/etc/thread1.conf

so that if you ever have any problems or errors, you can at least tell how the threads were laid out just by looking at the output.

Installation of Patch

Download the patch file. If it is packed as a gz or tar.gz unpack it first. Then copy it to the motion source directory and issue the command (assuming the patch file is called filename_of_patch_file.diff)

patch < filename_of_patch_file.diff

Then re-build Motion and test the patch.

Change History of Patch

  • 1.0 Initial revision

Discussion and Comments

Great little improvement.

I additionally also added the same improvement to the device reporting so the startup sequence now can look like this

[0] Thread 1 is from /usr/local/etc/thread1.conf
[0] Thread 1 is device: /dev/video13 input 8
[0] Thread 2 is from /usr/local/etc/thread2.conf
[0] Thread 2 is device: /dev/video0 input 0
[0] Thread 3 is from /usr/local/etc/thread3.conf
[0] Thread 3 is device: /dev/video1 input 0
[0] Thread 4 is from /usr/local/etc/thread4.conf
[0] Thread 4 is device: /dev/video10 input 8
[0] Thread 5 is from /usr/local/etc/thread5.conf
[0] Thread 5 is device: /dev/video9 input 8
[0] Thread 6 is from /usr/local/etc/thread6.conf
[0] Thread 6 is device: /dev/video2 input 0
[0] Thread 7 is from /usr/local/etc/thread7.conf
[0] Thread 7 is device: /dev/video12 input 8
[0] Thread 8 is from /usr/local/etc/thread8.conf
[0] Thread 8 is device: /dev/video8 input 8
[0] Thread 9 is from /usr/local/etc/thread9.conf
[0] Thread 9 is device: /dev/video11 input 8
[0] Thread 10 is from /usr/local/etc/thread10.conf
[0] Thread 10 is device: /dev/video3 input 0
[0] Thread 11 is from /usr/local/etc/thread11.conf
[0] Thread 11 is device: http://192.168.1.15/VIDEO.CGI input -1

Committed as SVN 73.

KennethLavrsen

In 3.2.7

-- KennethLavrsen - 20 Oct 2006
Topic revision: r3 - 20 Oct 2006, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.