4 /* Forward delcarations */
16 kVSFLogEntryFTPOutput
,
17 kVSFLogEntryConnection
,
27 * Initialize the logging services, by opening a writable file descriptor to
28 * the log file (should logging be enabled).
30 * p_sess - the current session object
32 void vsf_log_init(struct vsf_session
* p_sess
);
34 /* vsf_log_start_entry()
36 * Denote the start of a logged operation. Importantly, timing information
37 * (if applicable) will be taken starting from this call.
39 * p_sess - the current session object
40 * what - the type of operation which just started
42 void vsf_log_start_entry(struct vsf_session
* p_sess
,
43 enum EVSFLogEntryType what
);
45 /* vsf_log_entry_pending()
47 * Determine whether a log entry has been started and not yet closed.
49 * 0 if no log entry is pending; 1 if one is.
51 int vsf_log_entry_pending(struct vsf_session
* p_sess
);
53 /* vsf_log_clear_entry()
55 * Clears any pending log entry.
57 void vsf_log_clear_entry(struct vsf_session
* p_sess
);
61 * Denote the end of a logged operation, specifying whether the operation
62 * was successful or not.
64 * p_sess - the current session object
65 * succeeded - 0 for a failed operation, 1 for a successful operation
67 void vsf_log_do_log(struct vsf_session
* p_sess
, int succeeded
);
71 * Logs a single line of information, without disturbing any pending log
72 * operations (e.g. a download log spans a period of time).
73 * This call must be used for any logging calls nested within a call to
74 * the vsf_log_start_entry() function.
76 * p_sess - the current session object
77 * what - the type of operation to log
78 * p_str - the string to log
80 void vsf_log_line(struct vsf_session
* p_sess
, enum EVSFLogEntryType what
,
83 #endif /* VSF_LOGGING_H */