Move UC_LOG_DESTINATION enum to logging.c, it's
not a public type
This commit is contained in:
+3
-13
@@ -83,18 +83,6 @@ enum UC_LOG_LEVEL {
|
|||||||
UC_LL_NONE = 9,
|
UC_LL_NONE = 9,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** A destination for the logging messages*/
|
|
||||||
enum UC_LOG_DESTINATION {
|
|
||||||
/** Logs using the unix syslog system */
|
|
||||||
UC_LDEST_SYSLOG,
|
|
||||||
|
|
||||||
/** Prints log messages to stderr. */
|
|
||||||
UC_LDEST_STDERR,
|
|
||||||
|
|
||||||
/** Prints log messages to a file */
|
|
||||||
UC_LDEST_FILE,
|
|
||||||
};
|
|
||||||
|
|
||||||
/** A module of a program, that will perform logging.
|
/** A module of a program, that will perform logging.
|
||||||
* This is used group logging from parts of a larger program,
|
* This is used group logging from parts of a larger program,
|
||||||
* and allow the log message to identigy which module the
|
* and allow the log message to identigy which module the
|
||||||
@@ -149,11 +137,13 @@ enum UC_LOG_ROTATE_POLICY {
|
|||||||
struct UCLogRotateSettings {
|
struct UCLogRotateSettings {
|
||||||
/** Policy */
|
/** Policy */
|
||||||
enum UC_LOG_ROTATE_POLICY policy;
|
enum UC_LOG_ROTATE_POLICY policy;
|
||||||
|
|
||||||
/** For UC_LOG_ROTATE_SIZE policy */
|
/** For UC_LOG_ROTATE_SIZE policy */
|
||||||
struct {
|
struct {
|
||||||
/** Max size of an individual log file */
|
/** Max size of an individual log file */
|
||||||
size_t max_size;
|
size_t max_size;
|
||||||
/** Max number of log files to keep.
|
/** Max number of extra log files to keep in addition
|
||||||
|
* to the current log file.
|
||||||
* Is forced to be at least 1*/
|
* Is forced to be at least 1*/
|
||||||
unsigned int num_files;
|
unsigned int num_files;
|
||||||
} size_settings;
|
} size_settings;
|
||||||
|
|||||||
@@ -12,6 +12,18 @@
|
|||||||
#include "ucore/logging.h"
|
#include "ucore/logging.h"
|
||||||
#include "ucore/utils.h"
|
#include "ucore/utils.h"
|
||||||
|
|
||||||
|
/** A destination for the logging messages*/
|
||||||
|
enum UC_LOG_DESTINATION {
|
||||||
|
/** Logs using the unix syslog system */
|
||||||
|
UC_LDEST_SYSLOG,
|
||||||
|
|
||||||
|
/** Prints log messages to stderr. */
|
||||||
|
UC_LDEST_STDERR,
|
||||||
|
|
||||||
|
/** Prints log messages to a file */
|
||||||
|
UC_LDEST_FILE,
|
||||||
|
};
|
||||||
|
|
||||||
/** Max suffixes we'll try to apply to a log file when rotating before
|
/** Max suffixes we'll try to apply to a log file when rotating before
|
||||||
* giving up
|
* giving up
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user