Commit Graph

33 Commits

Author SHA1 Message Date
Mr-DaveDev
189974106b Native Language Revisions
* Revise MOTION_LOG macro

* Add native_language option

* Additional languages

* Add log messages to po files
2018-06-09 14:17:02 -06:00
Mr-DaveDev
3c7cbd6850 Initialize the thread at start of main
Closes #589
2018-01-01 13:07:08 -07:00
Mr-DaveDev
eef702b3d7 Fix builds on musl based systems
* Fix pthread_setname_np detection

Commit 6617c6f2c8 replaced
AC_LINK_IFELSE with AC_COMPILE_IFELSE. This has broken the
pthread_setname_np detection as compilation will always succeed even if
pthread_setname_np is not available (if the function is not found, a
simple warning will be displayed in config.log).

The correct fix is to put back AC_LINK_IFELSE with -pthread in LIBS
otherwise compilation will fail on toolchain without pthread_setname_np.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

* Check for pthread_getname_np

On some toolchains (like musl), pthread_setname_np is available but not
pthread_getname_np so add this check in configure.ac

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

* Revision for detection of XSI vs GNU variants of strerror
2017-12-09 15:42:16 -07:00
MrDave
f34ad7485c Add flood control to logger
1.  Implement flood control to avoid duplication of messages to the log.

Closes #282
2017-10-28 19:21:11 -06:00
Fabrice Fontaine
4b76ddaf96 Put back the detection of pthread_setname_np
pthread_setname_np is a nonstandard GNU extension so put back its
detection, deleted by commit ab5835d435,
to be able to cross-compile motion with non glibc toolchains

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2017-05-12 20:45:25 +02:00
Daniel Richard G
1b6022f595 Various logging-system fixes
* Use openlog() and closelog() so that we don't leak a file descriptor
  (hello Valgrind) when the program exits in syslog mode

* Update comments to reflect actual log text being generated

* Moved va_end() closer to its corresponding va_start()

* Define new LOGMODE_NONE mode so that we can close out logging
  completely at program end
2017-04-10 17:01:36 -04:00
Sebastiaan Lokhorst
29667fce7c Fix OpenBSD and NetBSD compilation 2016-12-12 02:14:20 +01:00
Pisike Sipelgas
8a3067f369 freebsd motion build fixes. issue #267 2016-12-06 14:01:10 +02:00
Joseph Heenan
ab5835d435 MacOS: Add support for Mac variant of pthread_setname_np
We add a simple wrapper #define to hide the difference between the
Mac and other platforms version of this function. The tests should
cover all our supported platforms, so remove the configure test.
2016-10-23 12:44:41 +01:00
Joseph Heenan
80e78f559b Add threadname to logging output
As the logging currently is, you can't see whether log messages came
from the netcam thread or the motion loop thread, and messages that
come from the ffmpeg thread appear to come from the main thread. This
makes debugging based on the log messages error prone at best.

As an added bonus any camera name is now included.
2016-10-12 08:21:28 +01:00
MrDave
e4b5627a70 Revert to standard os file buffering 2016-09-03 11:44:36 -06:00
Mr Dave
33b7d4f045 Clean tabs for issue 071831 patch 2015-09-05 13:08:41 -06:00
Dave
976fe425a5 Removed compiler warnings and small bug fix for webhttpd.c 2014-06-13 20:47:13 -06:00
Dave
048791e449 Merge tosiara/rtsp branch (commit 46cfcf31d, 2014/05/21) 2014-06-13 19:52:34 -06:00
Angel Carpintero
05b815771a - Added a new starting option -m to disable motion detection
- Fixed configure for SDL
- Little fix in logging because was broken
- Replaced malloc by calloc in mymalloc()
2012-01-01 20:07:17 +01:00
Angel Carpintero
2efcf1bb61 * Added new log type COR , to filter messages from CORE.
* Fixed a bug in post_capture. It was missed under certain conditions.
2011-11-27 20:24:09 +01:00
Angel Carpintero
d8063fb1df - Change default log level to 6 / NTC
- Reviewed log levels to make motion less verbose and move most of them to NTC level.
2010-05-23 00:01:05 +02:00
AngelCarpintero
7022d0ef9d Enhancing the palette selection 2010-04-25 10:19:52 +00:00
AngelCarpintero
16de00f550 www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2010x04x13x032553 and little change in logger to allow type TYPE_ALL 2010-04-15 20:56:17 +00:00
AngelCarpintero
3e53086a81 fix spelling and code standard compliant 2010-04-05 18:35:19 +00:00
AngelCarpintero
07f9e36891 fixes in new log system 2010-04-05 03:02:41 +00:00
AngelCarpintero
f7469950d0 Added a macro MOTION_LOG , no need to add __FUNCTION__ anymore. 2010-04-04 21:50:50 +00:00
AngelCarpintero
79cf297cd4 Implemented http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionLog 2010-04-03 19:34:23 +00:00
AngelCarpintero
6d35a01104 Make cosmetic changes in comments, description of functions and fix some code to be compliant with CODE STANDARD 2010-03-29 19:24:57 +00:00
AngelCarpintero
66dc7dce6d Avoid segfault when motion cannot create a logfile 2010-03-25 17:43:07 +00:00
AngelCarpintero
7dc98cfce0 Exit motion when image dimensions are not modulo 16 2009-12-01 07:17:49 +00:00
AngelCarpintero
b86215f11e Better support for strerror_r() 2009-11-15 19:36:56 +00:00
AngelCarpintero
8cfebd2f8b Avoid segfault detecting strerror_r() version GNU or SUSv3 2009-07-15 18:18:53 +00:00
AngelCarpintero
314a4ee004 http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionWriteBuffersPatch 2009-07-08 07:11:19 +00:00
AngelCarpintero
0f71dabed4 Added the option logfile to log message to text file. Removed level -1 to log to stderr, don't use always short 2009-03-09 04:36:17 +00:00
AngelCarpintero
cc57b56ec6 * Fix warning for syslog() , Added support for some new bayer palettes introduced in kernel 2.6.27.
http://www.lavrsen.dk/twiki/bin/view/Motion/FeatureRequest2008x10x15x130110
  Increased buffer in ffmpeg to allow encoding at 1600x1200
* Avoid possible stack smashing in v4l_open_vidpipe().
2008-10-18 19:13:24 +00:00
AngelCarpintero
623085d49c Apply new code standard ( chuck 1 ) 2008-07-16 20:15:27 +00:00
AngelCarpintero
b969b6a5bf Forget to checking logger 2008-05-18 22:17:42 +00:00