|
|
2f270e |
#ifndef TOKSVC_LOG_IMPL_H
|
|
|
2f270e |
#define TOKSVC_LOG_IMPL_H
|
|
|
2f270e |
|
|
|
2f270e |
#include <psxtypes/psxtypes.h>
|
|
|
f2a689 |
#include <ntapi/nt_tty.h>
|
|
|
2f270e |
|
|
|
2f270e |
#define TOKS_LOG_LEVEL(dctx,x) \
|
|
|
2f270e |
if (dctx->cctx->loglevel < x) \
|
|
|
2f270e |
return
|
|
|
2f270e |
|
|
|
2f270e |
#define TOKS_LOG_CHILD_EXIT_STATUS(x) (((x) & 0xff00) >> 8)
|
|
|
2f270e |
#define TOKS_LOG_CHILD_KILL_STATUS(x) (((x) & 0x7f))
|
|
|
2f270e |
|
|
|
2f270e |
enum toks_log_entry_type {
|
|
|
2f270e |
TOKS_LOG_ENTRY_SERVER_STATUS,
|
|
|
2f270e |
TOKS_LOG_ENTRY_SERVER_INFO,
|
|
|
2f270e |
TOKS_LOG_ENTRY_SERVER_ERROR,
|
|
|
2f270e |
TOKS_LOG_ENTRY_CLIENT_STATUS,
|
|
|
2f270e |
TOKS_LOG_ENTRY_CLIENT_INFO,
|
|
|
2f270e |
TOKS_LOG_ENTRY_CLIENT_ERROR,
|
|
|
2f270e |
TOKS_LOG_ENTRY_SUB_LEVEL_1,
|
|
|
2f270e |
TOKS_LOG_ENTRY_SUB_LEVEL_2,
|
|
|
2f270e |
TOKS_LOG_ENTRY_SUB_LEVEL_3,
|
|
|
2f270e |
TOKS_LOG_ENTRY_SUB_LEVEL_4,
|
|
|
2f270e |
TOKS_LOG_ENTRY_SUB_LEVEL_5,
|
|
|
2f270e |
TOKS_LOG_ENTRY_SUB_LEVEL_6,
|
|
|
2f270e |
};
|
|
|
2f270e |
|
|
|
2f270e |
const char * toks_log_basename(const char * path);
|
|
|
2f270e |
|
|
|
2f270e |
void toks_log_header(
|
|
|
2f270e |
const struct toks_driver_ctx *,
|
|
|
2f270e |
enum toks_log_entry_type,
|
|
|
2f270e |
const char *,
|
|
|
2f270e |
...);
|
|
|
2f270e |
|
|
|
2f270e |
void toks_log_write(
|
|
|
2f270e |
const struct toks_driver_ctx *,
|
|
|
2f270e |
enum toks_log_entry_type,
|
|
|
2f270e |
const char *,
|
|
|
2f270e |
...);
|
|
|
2f270e |
|
|
|
2f270e |
void toks_log_get_process_name(
|
|
|
2f270e |
void *, char *, size_t);
|
|
|
2f270e |
|
|
|
2f270e |
void toks_log_get_arbitrary_process_name(
|
|
|
2f270e |
nt_cid *, char *, size_t);
|
|
|
2f270e |
|
|
|
f2a689 |
void toks_log_lpc_request(
|
|
|
f2a689 |
const struct toks_driver_ctx *,
|
|
|
f2a689 |
const nt_tty_port_msg *);
|
|
|
f2a689 |
|
|
|
2f270e |
#endif
|