Lines Matching +full:format +full:- +full:extra +full:- +full:args
2 * logging.c - Centralised logging. Originated from the Linux-NTFS project.
5 * Copyright (c) 2005-2008 Szabolcs Szakacsits
6 * Copyright (c) 2010 Jean-Pierre Andre
19 * along with this program (in the main directory of the NTFS-3G
21 * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
62 # define BROKEN_GCC_FORMAT_ATTRIBUTE __attribute__((format(printf, 6, 0)))
66 * struct ntfs_logging - Control info for the logging system
99 * ntfs_log_get_levels - Get a list of the current logging levels
103 * Returns: Log levels in a 32-bit field
111 * ntfs_log_set_levels - Enable extra logging levels
112 * @levels: 32-bit field of log levels to set
128 * ntfs_log_clear_levels - Disable some logging levels
129 * @levels: 32-bit field of log levels to clear
146 * ntfs_log_get_flags - Get a list of logging style flags
150 * Returns: Logging flags in a 32-bit field
158 * ntfs_log_set_flags - Enable extra logging style flags
159 * @flags: 32-bit field of logging flags to set
175 * ntfs_log_clear_flags - Disable some logging styles
176 * @flags: 32-bit field of logging flags to clear
193 * ntfs_log_get_stream - Default output streams for logging levels
230 * ntfs_log_get_prefix - Default prefixes for logging levels
282 * ntfs_log_set_handler - Provide an alternate logging handler
294 openlog("ntfs-3g", LOG_PID, LOG_USER); in ntfs_log_set_handler()
301 * ntfs_log_redirect - Pass on the request to the real handler
307 * @format: printf-style formatting string
313 * Returns: -1 Error occurred
318 int line, u32 level, void *data, const char *format, ...) in ntfs_log_redirect() argument
322 va_list args; in ntfs_log_redirect() local
327 va_start(args, format); in ntfs_log_redirect()
329 ret = ntfs_log.handler(function, file, line, level, data, format, args); in ntfs_log_redirect()
330 va_end(args); in ntfs_log_redirect()
338 * ntfs_log_handler_syslog - syslog logging handler
344 * @format: printf-style formatting string
345 * @args: Arguments to be formatted
349 * Returns: -1 Error occurred
363 const char *format, va_list args) in ntfs_log_handler_syslog() argument
372 ret = vsnprintf(logbuf, LOG_LINE_LEN, format, args); in ntfs_log_handler_syslog()
374 vsyslog(LOG_NOTICE, format, args); in ntfs_log_handler_syslog()
380 strncat(logbuf, ": ", LOG_LINE_LEN - ret - 1); in ntfs_log_handler_syslog()
381 strncat(logbuf, strerror(olderr), LOG_LINE_LEN - (ret + 3)); in ntfs_log_handler_syslog()
395 * (not quite satisfactory : this appears before the ntfs-g banner,
399 void ntfs_log_early_error(const char *format, ...) in ntfs_log_early_error() argument
401 va_list args; in ntfs_log_early_error() local
403 va_start(args, format); in ntfs_log_early_error()
405 openlog("ntfs-3g", LOG_PID, LOG_USER); in ntfs_log_early_error()
408 format, args); in ntfs_log_early_error()
410 vfprintf(stderr,format,args); in ntfs_log_early_error()
412 va_end(args); in ntfs_log_early_error()
416 * ntfs_log_handler_fprintf - Basic logging handler
422 * @format: printf-style formatting string
423 * @args: Arguments to be formatted
432 * Returns: -1 Error occurred
437 int line, u32 level, void *data, const char *format, va_list args) in ntfs_log_handler_fprintf() argument
453 tab--; in ntfs_log_handler_fprintf()
477 ret += vfprintf(stream, format, args); in ntfs_log_handler_fprintf()
492 * ntfs_log_handler_null - Null logging handler (no output)
498 * @format: printf-style formatting string
499 * @args: Arguments to be formatted
508 const char *format __attribute__((unused)), va_list args __attribute__((unused))) in ntfs_log_handler_null() argument
514 * ntfs_log_handler_stdout - All logs go to stdout
520 * @format: printf-style formatting string
521 * @args: Arguments to be formatted
530 * Returns: -1 Error occurred
535 int line, u32 level, void *data, const char *format, va_list args) in ntfs_log_handler_stdout() argument
540 return ntfs_log_handler_fprintf(function, file, line, level, data, format, args); in ntfs_log_handler_stdout()
544 * ntfs_log_handler_outerr - Logs go to stdout/stderr depending on level
550 * @format: printf-style formatting string
551 * @args: Arguments to be formatted
561 * Returns: -1 Error occurred
566 int line, u32 level, void *data, const char *format, va_list args) in ntfs_log_handler_outerr() argument
571 return ntfs_log_handler_fprintf(function, file, line, level, data, format, args); in ntfs_log_handler_outerr()
575 * ntfs_log_handler_stderr - All logs go to stderr
581 * @format: printf-style formatting string
582 * @args: Arguments to be formatted
591 * Returns: -1 Error occurred
596 int line, u32 level, void *data, const char *format, va_list args) in ntfs_log_handler_stderr() argument
601 return ntfs_log_handler_fprintf(function, file, line, level, data, format, args); in ntfs_log_handler_stderr()
606 * ntfs_log_parse_option - Act upon command line options
610 * with "--log-". Options cause log levels to be enabled in @ntfs_log (the
620 if (strcmp(option, "--log-debug") == 0) { in ntfs_log_parse_option()
623 } else if (strcmp(option, "--log-verbose") == 0) { in ntfs_log_parse_option()
626 } else if (strcmp(option, "--log-quiet") == 0) { in ntfs_log_parse_option()
629 } else if (strcmp(option, "--log-trace") == 0) { in ntfs_log_parse_option()