Commit Graph

31 Commits

Author SHA1 Message Date
Nils O. Selåsdal c6318c079d Re-format code to avoid overly long lines and declarations 2015-04-04 23:29:27 +02:00
Nils O. Selåsdal db21dc4100 use %u instead of %d in file name format string 2015-02-11 22:20:07 +01:00
Nils O. Selåsdal c90ad5e257 There's no good reason to not always reset the file size
after re-opening
2015-02-10 21:46:08 +01:00
Nils O. Selåsdal ab70a2c5be Make uc_log_init argument const 2014-12-02 23:38:24 +01:00
Nils O. Selåsdal dd925b3654 int log_level->enum UC_LOG_LEVEL 2014-12-02 23:22:18 +01:00
Nils O. Selåsdal 13e611c79d Generalise the logging function to a function pointer 2014-09-16 13:30:51 +02:00
Nils O. Selåsdal 802462a5c0 Move UC_LOG_DESTINATION enum to logging.c, it's
not a public type
2014-09-12 01:11:40 +02:00
Nils O. Selåsdal d9bb5315f8 Use snprintf over sprintf 2014-09-12 01:11:40 +02:00
Nils O. Selåsdal 10c0e37253 Fix size rotating, so filenames are in the order of newest to oldest 2014-09-12 01:11:40 +02:00
Nils O. Selåsdal dc9e38b231 Fix raw loggin use of uninitialized value introduced in previous commit 2014-09-12 01:11:40 +02:00
Nils O. Selåsdal 7bd1074c1d Initial attempt of log rotation based on file sizes 2014-09-12 01:11:40 +02:00
Nils O. Selåsdal b75048ceef Keep track of bytes written to a file 2014-09-12 01:11:40 +02:00
Nils O. Selåsdal 13c601f3b7 fix indentation 2014-09-12 01:11:40 +02:00
Nils O. Selåsdal 008004c6bd Slight refactor of checking if a destination exists 2014-09-12 01:11:40 +02:00
Nils O. Selåsdal edde6ec7b6 Use TailQ instead of sys/queue.h in the logging module 2014-09-12 01:11:40 +02:00
Nils O. Selåsdal 0e2d4f07c3 Adhere to coding style in logging module (struct uc_log_destination->
struct UCLogDestination, and similar for other structs)
2014-01-07 23:39:01 +01:00
Nils O. Selåsdal bcafaace29 Fix the log level string of NONE. 2013-11-30 04:48:26 +01:00
Nils O. Selåsdal ee3dd22b0e Convert logging to use UC_SRC_LOCATION 2013-10-16 01:44:36 +02:00
Nils O. Selåsdal e1834c22b1 Dop inline on uc_ll_2_str to avoid clang warning 2013-06-23 23:04:23 +02:00
Nils O. Selåsdal 4aadb0ab2d Clean up main logging function 2013-06-20 20:11:07 +02:00
Nils O. Selåsdal 84153e90db Make UC_LL_NONE work 2013-06-20 19:55:09 +02:00
Nils O. Selåsdal 74b59a3a38 Implement setting log mask string on a destination.
Improve logging docs
2013-06-12 21:50:59 +02:00
Nils O. Selåsdal d1eded3f9d grap log lock when initializing a destination 2013-06-05 21:17:18 +02:00
Nils O. Selåsdal f8116643af Add uc_log_destination_set_log_location, fix signed/unsigned use 2013-06-05 21:09:35 +02:00
Nils O. Selåsdal 9125f6128a Merge branch 'dev' of ssh://box.fiane.intra/var/lib/git/libucore into dev 2013-06-05 20:52:16 +02:00
Nils O. Selåsdal 972381bf13 Use static array for log level strings 2013-06-05 20:51:53 +02:00
Nils O. Selåsdal 032e50e1cd Remove setting log level for a module, implement
setting log level for a destination
2013-06-01 23:45:14 +02:00
Nils O. Selåsdal 10e717fc7d Preserve errno if opening log file fails 2013-05-31 03:49:54 +02:00
Nils O. Selåsdal af8cab5034 Prepare for having per destination module log levels 2013-05-31 03:40:33 +02:00
Nils O. Selåsdal b80c2f633f prefix global variables with g_ 2013-03-07 21:11:16 +01:00
Nils O. Selåsdal 8badeaf857 Remove ucore_ prefix from headers and source files 2013-03-06 22:22:04 +01:00