Turnstone Operating System
|
logging headers More...
Macros | |
#define | ___LOGGING_H 0 |
#define | LOG_LEVEL LOG_INFO |
#define | LOG_LEVEL_KERNEL LOG_INFO |
#define | LOG_LEVEL_MEMORY LOG_INFO |
#define | LOG_LEVEL_SIMPLEHEAP LOG_INFO |
#define | LOG_LEVEL_PAGING LOG_INFO |
#define | LOG_LEVEL_FRAMEALLOCATOR LOG_INFO |
#define | LOG_LEVEL_ACPI LOG_INFO |
#define | LOG_LEVEL_ACPIAML LOG_INFO |
#define | LOG_LEVEL_VIDEO LOG_INFO |
#define | LOG_LEVEL_LINKER LOG_INFO |
#define | LOG_LEVEL_TASKING LOG_INFO |
#define | LOG_LEVEL_EFI LOG_INFO |
#define | LOG_LEVEL_PCI LOG_INFO |
#define | LOG_LEVEL_APIC LOG_INFO |
#define | LOG_LEVEL_IOAPIC LOG_INFO |
#define | LOG_LEVEL_TIMER LOG_INFO |
#define | LOG_LEVEL_AHCI LOG_INFO |
#define | LOG_LEVEL_NETWORK LOG_INFO |
#define | LOG_LEVEL_VIRTIO LOG_INFO |
#define | LOG_LEVEL_VIRTIONET LOG_INFO |
#define | LOG_LEVEL_E1000 LOG_INFO |
#define | LOG_LEVEL_FAT LOG_INFO |
#define | LOG_LEVEL_NVME LOG_INFO |
#define | LOG_LEVEL_TOSDB LOG_INFO |
#define | LOG_LEVEL_HEAP_HASH LOG_INFO |
#define | LOG_LEVEL_VIRTIOGPU LOG_INFO |
#define | LOG_LEVEL_HPET LOG_INFO |
#define | LOG_LEVEL_VMWARESVGA LOG_INFO |
#define | LOG_LEVEL_USB LOG_INFO |
#define | LOG_LEVEL_COMPRESSION LOG_INFO |
#define | LOG_LEVEL_COMPILER LOG_INFO |
#define | LOG_LEVEL_COMPILER_ASSEMBLER LOG_INFO |
#define | LOG_LEVEL_COMPILER_PASCAL LOG_INFO |
#define | LOG_LEVEL_HYPERVISOR LOG_INFO |
#define | LOG_LOCATION 1 |
#define | LOG_NEED_LOG(M, L) logging_need_logging(M, L) |
#define | LOGBLOCK(M, L) if(LOG_NEED_LOG(M, L)) |
#define | PRINTLOG(M, L, msg, ...) logging_printlog(M, L, __FILE__, __LINE__, msg, ## __VA_ARGS__) |
kernel logging macro More... | |
#define | NOTIMPLEMENTEDLOG(M) PRINTLOG(M, LOG_ERROR, "not implemented: %s", __FUNCTION__) |
Typedefs | |
typedef enum logging_modules_t | logging_modules_t |
type short hand for enum logging_modules_e | |
typedef enum logging_level_t | logging_level_t |
type short hand for enum logging_level_e | |
Enumerations | |
enum | logging_modules_t { KERNEL , MEMORY , SIMPLEHEAP , PAGING , FRAMEALLOCATOR , ACPI , ACPIAML , VIDEO , LINKER , TASKING , EFI , PCI , APIC , IOAPIC , TIMER , AHCI , NETWORK , VIRTIO , VIRTIONET , E1000 , FAT , NVME , TOSDB , HEAP_HASH , VIRTIOGPU , HPET , VMWARESVGA , USB , COMPRESSION , COMPILER , COMPILER_ASSEMBLER , COMPILER_PASCAL , HYPERVISOR } |
logging module enums | |
enum | logging_level_t { LOG_PANIC =0 , LOG_FATAL =1 , LOG_ERROR =2 , LOG_WARNING =3 , LOG_INFO =4 , LOG_DEBUG =5 , LOG_VERBOSE =7 , LOG_TRACE =9 } |
loggging levels | |
Functions | |
boolean_t | logging_need_logging (logging_modules_t module, logging_level_t level) |
void | logging_set_level (logging_modules_t module, logging_level_t level) |
void | logging_printlog (uint64_t module, uint64_t level, const char_t *file_name, uint64_t line_no, const char_t *format,...) |
kernel logging function More... | |
logging headers
This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.
#define ___LOGGING_H 0 |
prevent duplicate header error macro
#define LOG_LEVEL LOG_INFO |
default log level for all modules
#define LOG_LEVEL_ACPI LOG_INFO |
default log level for acpi module
#define LOG_LEVEL_ACPIAML LOG_INFO |
default log level for acpi aml module
#define LOG_LEVEL_AHCI LOG_INFO |
default log level for ahci module
#define LOG_LEVEL_APIC LOG_INFO |
default log level for apic module
#define LOG_LEVEL_COMPILER LOG_INFO |
default log level for compiler module
#define LOG_LEVEL_COMPILER_ASSEMBLER LOG_INFO |
default log level for compiler assembler module
#define LOG_LEVEL_COMPILER_PASCAL LOG_INFO |
default log level for compiler pascal module
#define LOG_LEVEL_COMPRESSION LOG_INFO |
default log level for compression module
#define LOG_LEVEL_E1000 LOG_INFO |
default log level for e1000 module
#define LOG_LEVEL_EFI LOG_INFO |
default log level for efi module
#define LOG_LEVEL_FAT LOG_INFO |
default log level for fat module
#define LOG_LEVEL_FRAMEALLOCATOR LOG_INFO |
default log level for frame allocator module
#define LOG_LEVEL_HEAP_HASH LOG_INFO |
default log level for heap hash module
#define LOG_LEVEL_HPET LOG_INFO |
default log level for hpet module
#define LOG_LEVEL_HYPERVISOR LOG_INFO |
default log level for hypervisor module
#define LOG_LEVEL_IOAPIC LOG_INFO |
default log level for ioapic module
#define LOG_LEVEL_KERNEL LOG_INFO |
default log level for kernel module
#define LOG_LEVEL_LINKER LOG_INFO |
default log level for linker module
#define LOG_LEVEL_MEMORY LOG_INFO |
default log level for memory module
#define LOG_LEVEL_NETWORK LOG_INFO |
default log level for network module
#define LOG_LEVEL_NVME LOG_INFO |
default log level for nvme module
#define LOG_LEVEL_PAGING LOG_INFO |
default log level for paging module
#define LOG_LEVEL_PCI LOG_INFO |
default log level for pci module
#define LOG_LEVEL_SIMPLEHEAP LOG_INFO |
default log level for simple heap module
#define LOG_LEVEL_TASKING LOG_INFO |
default log level for tasking module
#define LOG_LEVEL_TIMER LOG_INFO |
default log level for timer module
#define LOG_LEVEL_TOSDB LOG_INFO |
default log level for nvme module
#define LOG_LEVEL_USB LOG_INFO |
default log level for usb module
#define LOG_LEVEL_VIDEO LOG_INFO |
default log level for video module
#define LOG_LEVEL_VIRTIO LOG_INFO |
default log level for virtio module
#define LOG_LEVEL_VIRTIOGPU LOG_INFO |
default log level for vmware svga module
#define LOG_LEVEL_VIRTIONET LOG_INFO |
default log level for virtio net module
#define LOG_LEVEL_VMWARESVGA LOG_INFO |
default log level for vmware svga module
#define LOG_LOCATION 1 |
file and line no will be logged?
#define LOG_NEED_LOG | ( | M, | |
L | |||
) | logging_need_logging(M, L) |
checks for need logging for log message
#define LOGBLOCK | ( | M, | |
L | |||
) | if(LOG_NEED_LOG(M, L)) |
logs fellowing block
#define PRINTLOG | ( | M, | |
L, | |||
msg, | |||
... | |||
) | logging_printlog(M, L, __FILE__, __LINE__, msg, ## __VA_ARGS__) |
kernel logging macro
[in] | M | module name |
[in] | L | log level |
[in] | msg | log message, also if it contains after this there should be a variable arg list |
[in] | ... | arguments for format in msg |
void logging_printlog | ( | uint64_t | module, |
uint64_t | level, | ||
const char_t * | file_name, | ||
uint64_t | line_no, | ||
const char_t * | format, | ||
... | |||
) |
kernel logging function
[in] | module | module name |
[in] | level | log level |
[in] | line_no | line number |
[in] | file_name | file name |
[in] | format | format string |
[in] | ... | arguments for format in msg |