Skip to content

Commit

Permalink
[logging] Move internals that were landed in public headers by mistake.
Browse files Browse the repository at this point in the history
  • Loading branch information
kumpera committed Aug 31, 2016
1 parent 89ce2b9 commit e669004
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 41 deletions.
25 changes: 25 additions & 0 deletions mono/utils/mono-logger-internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,31 @@ mono_trace_message(MonoTraceMask mask, const char *format, ...)

#endif

/* Internal logging API */
typedef void (*MonoLoggerOpen) (const char *, void *);
typedef void (*MonoLoggerWrite) (const char *, GLogLevelFlags, mono_bool, const char *, va_list);
typedef void (*MonoLoggerClose) (void);

typedef struct _MonoLogCallParm_ {
MonoLoggerOpen opener; /* Routine to open logging */
MonoLoggerWrite writer; /* Routine to write log data */
MonoLoggerClose closer; /* Routine to close logging */
char *dest; /* Log destination */
void *user_data; /* User data from legacy handler */
mono_bool header; /* Whether we want pid/time/date in log message */
} MonoLogCallParm;

void mono_trace_set_log_handler_internal (MonoLogCallParm *callback, void *user_data);
void mono_trace_set_logdest_string (const char *value);
void mono_trace_set_logheader_string (const char *value);

void mono_log_open_syslog (const char *, void *);
void mono_log_write_syslog (const char *, GLogLevelFlags, mono_bool, const char *, va_list);
void mono_log_close_syslog (void);

void mono_log_open_logfile (const char *, void *);
void mono_log_write_logfile (const char *, GLogLevelFlags, mono_bool, const char *, va_list);
void mono_log_close_logfile (void);

G_END_DECLS

Expand Down
41 changes: 0 additions & 41 deletions mono/utils/mono-logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,9 @@ mono_trace_set_level_string (const char *value);
MONO_API void
mono_trace_set_mask_string (const char *value);

MONO_API void
mono_trace_set_logdest_string (const char *value);

MONO_API void
mono_trace_set_logheader_string (const char *value);

typedef void (*MonoPrintCallback) (const char *string, mono_bool is_stdout);
typedef void (*MonoLogCallback) (const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *user_data);


typedef void (*MonoLoggerOpen) (const char *, void *);
typedef void (*MonoLoggerWrite) (const char *, GLogLevelFlags, mono_bool, const char *, va_list);
typedef void (*MonoLoggerClose) (void);

typedef struct _MonoLogCallParm_ {
MonoLoggerOpen opener; /* Routine to open logging */
MonoLoggerWrite writer; /* Routine to write log data */
MonoLoggerClose closer; /* Routine to close logging */
char *dest; /* Log destination */
void *user_data; /* User data from legacy handler */
mono_bool header; /* Whether we want pid/time/date in log message */
} MonoLogCallParm;

void
mono_trace_set_log_handler_internal (MonoLogCallParm *callback, void *user_data);

MONO_API void
mono_trace_set_log_handler (MonoLogCallback callback, void *user_data);

Expand All @@ -45,24 +22,6 @@ mono_trace_set_print_handler (MonoPrintCallback callback);
MONO_API void
mono_trace_set_printerr_handler (MonoPrintCallback callback);

MONO_API void
mono_log_open_syslog(const char *, void *);

MONO_API void
mono_log_write_syslog(const char *, GLogLevelFlags, mono_bool, const char *, va_list);

MONO_API void
mono_log_close_syslog(void);

MONO_API void
mono_log_open_logfile(const char *, void *);

MONO_API void
mono_log_write_logfile(const char *, GLogLevelFlags, mono_bool, const char *, va_list);

MONO_API void
mono_log_close_logfile(void);

MONO_END_DECLS

#endif /* __MONO_LOGGER_H__ */

0 comments on commit e669004

Please sign in to comment.